Image screening methods, devices, electronic equipment, and computer storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-02-20
- Publication Date
- 2026-06-30
AI Technical Summary
Existing image screening methods rely on manual review, which leads to inefficiency, especially when there are too many image review orders or when the images do not meet the standards, which may result in excessively long review times or frequent order cancellations.
The pixel values of the target image are calculated by multiple filters in the preprocessing sub-model of the image filtering model to obtain a residual image. The convolution kernel and general feature extractor of the filtering sub-model are then used to calculate the residual image to obtain multiple statistical feature information and determine whether the image has been modified.
It improves the efficiency of image filtering, better captures the impact of secondary processing on images, reduces the limitation of dependence on adjacent pixels, and achieves more efficient image filtering.
Smart Images

Figure CN116188800B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to an image screening method, apparatus, electronic device and computer storage medium. Background Technology
[0002] With the continuous development of the internet and information technology, online business processing has gradually penetrated into all walks of life. Electronic documents such as images have become key supporting materials for approval and review. However, electronic documents are also susceptible to secondary processing and modification. Therefore, online business processing is increasingly emphasizing the verification of the credibility of images uploaded by users.
[0003] Current image screening methods rely on manual review by auditors after users upload images, checking for issues such as secondary image manipulation. Because this manual review process is inefficient, it can lead to excessively long review times or frequent order cancellations when there are too many review requests or when uploaded images fail to meet standards. Summary of the Invention
[0004] This application provides an image filtering method, apparatus, electronic device, and computer storage medium, which can improve the efficiency of filtering images that have undergone secondary processing.
[0005] In a first aspect, embodiments of this application provide an image filtering method, which may include:
[0006] Acquire the target image;
[0007] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated by multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image.
[0008] The residual image is input into the filtering sub-model of the image filtering model. The residual image is calculated by the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image.
[0009] Based on multiple statistical features, the selection results for the target images are determined, and these results indicate whether the target images should be modified.
[0010] In one embodiment, the statistical characteristics mentioned above include maximum value, minimum value, average value, and variance.
[0011] In one embodiment, the aforementioned input of the target image into the preprocessing sub-model of the image filtering model, and the calculation of the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image, includes:
[0012] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated through multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image.
[0013] Based on the residual values of each pixel in the target image, a residual image of the target image including multiple channels is obtained.
[0014] In one embodiment, the preprocessing sub-model mentioned above includes N filters, where N is an integer greater than 1;
[0015] The target image is input into the preprocessing sub-model of the image filtering model. Multiple filters in the preprocessing sub-model calculate the pixel values of the target image to obtain the residual values for each pixel, including:
[0016] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated through N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image.
[0017] Based on the residual values of each pixel in the target image, a residual image of the target image including N channels is obtained.
[0018] In one embodiment, the above-mentioned input of the target image into the preprocessing sub-model of the image filtering model, and the calculation of the pixel values of the target image through N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image, includes:
[0019] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are linearly and nonlinearly calculated by N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. The linear calculation includes convolving the filter and the pixel values of the target image. The nonlinear calculation includes comparing the residual values obtained by convolving the pixel values of different filters and the pixel values of the target image, and taking the maximum or minimum value of the convolved residual values as the residual value corresponding to the pixel value of the target image.
[0020] In one embodiment, the above-mentioned determination of the target image filtering result based on multiple statistical feature information includes:
[0021] Multiple statistical features are input into an image binary classifier to obtain the selection results of the target image.
[0022] Secondly, embodiments of this application provide an image filtering device, which may include:
[0023] The acquisition module is used to acquire the target image;
[0024] The first calculation module is used to input the target image into the preprocessing sub-model of the image filtering model, and calculate the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image.
[0025] The second calculation module is used to input the residual image into the filtering sub-model of the image filtering model. The residual image is calculated by the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image.
[0026] The determination module is used to determine the filtering results of the target image based on multiple statistical features. The filtering results are used to indicate whether the target image should be modified.
[0027] Thirdly, embodiments of this application provide an electronic device, the device comprising:
[0028] processor;
[0029] Memory used to store processor-executable instructions;
[0030] The processor is configured to execute instructions to implement the image filtering method as shown in any embodiment of the first aspect.
[0031] Fourthly, embodiments of this application provide a computer storage medium storing a computer program that, when executed by a processor, implements the image filtering method as shown in any embodiment of the first aspect.
[0032] Fifthly, embodiments of this application also provide a computer program product comprising a computer program stored in a readable storage medium, wherein at least one processor of the device reads from the storage medium and executes the computer program, causing the device to perform the image screening method shown in any embodiment of the first aspect.
[0033] This application provides an image filtering method, apparatus, electronic device, and computer storage medium. Compared with the prior art, this application has the following advantages:
[0034] The image filtering method, apparatus, electronic device, and computer storage medium provided in this application calculate the pixel values of a target image using multiple filters in the preprocessing sub-model of the image filtering model to obtain a residual image corresponding to the target image. The residual image is then input into the filtering sub-model of the image filtering model, where multiple statistical feature information is obtained through the convolution kernel and general feature extractor of the filtering sub-model. Finally, the filtering result of the target image is determined based on the multiple statistical feature information.
[0035] Thus, by using multiple filters, the limitations of using a single filter to capture the dependencies between adjacent pixels are avoided, allowing for a better capture of these dependencies and thus a better understanding of the impact of secondary processing on the image. By utilizing multiple statistical features output by the filtering sub-model, filtering information indicating whether the target image has been modified can be determined, thereby improving the efficiency of the image filtering method. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a schematic flowchart of an image filtering method provided in an embodiment of this application;
[0038] Figure 2 This is a schematic diagram of a different filter type provided in an embodiment of this application;
[0039] Figure 3 This is a schematic diagram of the network structure of a screening sub-model provided in an embodiment of this application;
[0040] Figure 4 This is a schematic diagram of the structure of an image filtering device provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0042] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0043] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0044] As discussed in the background section, with the continuous development of the internet and information technology, online business processing has become increasingly prevalent across various industries, and electronic documents such as images, videos, and audio files have gradually become key supporting materials for approvals and reviews. Therefore, the quality of user-uploaded electronic supporting materials, including images, videos, and audio files, and the credibility of their sources, are receiving increasing attention. Simultaneously, reducing manual labor and adopting more efficient and accurate detection methods to screen the sources of electronic materials, thereby achieving cost reduction and efficiency improvement, has become a challenging direction.
[0045] To address the problems existing in the prior art, embodiments of this application provide an image filtering method, apparatus, electronic device, and computer storage medium. The method calculates pixel values of a target image using multiple filters in a preprocessing sub-model of the image filtering model to obtain a residual image corresponding to the target image. This residual image is then input into a filtering sub-model of the image filtering model, where convolution kernels and a general feature extractor are used to calculate multiple statistical feature information. Finally, based on these statistical feature information, the filtering result of the target image is determined. By using multiple filters, the limitations of using a single filter to capture the dependencies between adjacent pixels are avoided, allowing for better capture of these dependencies and thus better capture of the impact of secondary processing on the image. The multiple statistical feature information output by the filtering sub-model can determine filtering information indicating whether the target image has been modified, thereby improving the efficiency of the image filtering method.
[0046] This application provides an image filtering method, apparatus, electronic device, and computer storage medium. The image filtering method provided in this application will be described first. Figure 1 As shown, the image filtering method provided in this application includes the following steps:
[0047] S101: Acquire the target image;
[0048] S102: Input the target image into the preprocessing sub-model of the image filtering model, and calculate the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image;
[0049] S103: Input the residual image into the filtering sub-model of the image filtering model. The residual image is calculated by the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image.
[0050] S104: Based on multiple statistical features, determine the filtering results of the target image. The filtering results are used to indicate whether the target image should be modified.
[0051] This application provides an image filtering method. Multiple filters in the preprocessing sub-model of an image filtering model are used to calculate the pixel values of a target image, resulting in a residual image. This residual image is then input into the filtering sub-model of the image filtering model. The filtering sub-model uses convolutional kernels and a general feature extractor to calculate multiple statistical features. Finally, based on these statistical features, the filtering result of the target image is determined. By using multiple filters, the limitations of using a single filter to capture the dependencies between adjacent pixels are avoided. This method better captures the dependencies between adjacent pixels and thus better captures the impact of secondary processing on the image. The multiple statistical features output by the filtering sub-model determine the filtering information used to indicate whether the target image has been modified, thereby improving the efficiency of the image filtering method.
[0052] In S101, the target image can be any RGB image uploaded by the user and converted into a grayscale image, which can be used as the input of the preprocessing sub-model of the image filtering model.
[0053] In S102, the preprocessing sub-model of the image filtering model can include multiple filters. The pixel values of the target image are calculated using the preprocessing sub-model constructed from these filters to obtain the residual image corresponding to the target image. In one embodiment, the preprocessing sub-model can be constructed using four different types of filters. Type 1 filters estimate the value of the center pixel based on the values of its neighboring pixels; Type 2 filters combine multiple local linear models, making detection more accurate at image edges and in areas with complex textures; Type 3 filters use more pixel values and have better translation invariance; and Type 4 filters are derived from Type 3 and provide more accurate edge estimation. In one example, multiple filters in the preprocessing sub-model are used to perform linear and nonlinear operations to obtain a residual image with a corresponding number of channels.
[0054] In one example, the target image is input into the preprocessing sub-model of the image filtering model. Multiple filters in the preprocessing sub-model are used to calculate the pixel values of the target image, resulting in a residual image corresponding to the target image, including:
[0055] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated through multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image.
[0056] Based on the residual values of each pixel in the target image, a residual image of the target image including multiple channels is obtained.
[0057] In one example, the preprocessing sub-model includes N filters, where N is an integer greater than 1;
[0058] The target image is input into the preprocessing sub-model of the image filtering model. Multiple filters in the preprocessing sub-model calculate the pixel values of the target image to obtain the residual values for each pixel, including:
[0059] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated through N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image.
[0060] Based on the residual values of each pixel in the target image, a residual image of the target image including N channels is obtained.
[0061] In one example, the target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated using N filters in the preprocessing sub-model to obtain the residual values for each pixel, including:
[0062] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are linearly and nonlinearly calculated by N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. The linear calculation includes convolving the filter and the pixel values of the target image. The nonlinear calculation includes comparing the residual values obtained by convolving the pixel values of different filters and the pixel values of the target image, and taking the maximum or minimum value of the convolved residual values as the residual value corresponding to the pixel value of the target image.
[0063] To better describe the image filtering method provided in this application, the specific implementation of S102 is described below with a specific embodiment.
[0064] The preprocessing sub-model does not employ a random strategy but instead attempts to capture the dependencies between adjacent pixels, enabling the model to better capture the impact of secondary processing on the image. Using only a single filter to capture the dependencies between adjacent pixels has significant limitations; it's unlikely to achieve broad adaptability or yield relatively good results. Therefore, a preprocessing model is constructed using four different types of filters. Figure 2 As shown, Type 1 filters estimate the value of the center pixel based on the values of its neighboring pixels; Type 2 filters combine multiple local linear models, which makes detection more accurate at image edges and in areas with complex textures; Type 3 filters use more pixel values and have better translation invariance; Type 4 filters are derived from Type 3 and provide more accurate edge estimation.
[0065] Please refer to Figure 2 In the calculation of the residual, the estimated center pixel X i,j exist Figure 2 In the image, a black dot represents the filter, and the integer next to it represents the residual coefficients. Each type of symbol indicates a different filter. Filters containing only one type of symbol (excluding the black dot) are called spam type, while filters containing two or more different symbols (excluding the black dot) are called minmax type. We distinguish between these two types of filters and perform linear and nonlinear operations on their residuals, respectively. Linear operations involve directly convolving the filter with the digital image. In the spam type, the residual is calculated based on the coefficients of adjacent pixels of the high-pass filter. For example, the residual calculation method for spam14 in Type 1 is as follows:
[0066] R i,j =X i,j+1 -X i,j
[0067] Among them, R i,j X represents the residual value of the image at position (i,j). i,j X represents the pixel value at position (i,j) in the image. i,j It is predicted from the nearest pixel. Similarly, the residual calculation method for spam12 in Type2 is as follows:
[0068] R i,j =X i,j-1 +X i,j+1 -2X i,j
[0069] Nonlinear operations refer to taking the maximum (max) or minimum (min) of the combination of residual values obtained by convolving a filter with a digital image. For example, the residual calculation method represented by minmax21 in Type2 is as follows:
[0070] R i,j =min{X i,j-1 +X i,j+1 -2X i,j ,X i-1,j +X i+1,j -2X i,j}
[0071] R i,j =max{X i,j-1 +X i,j+1 -2X i,j ,X i-1,j +X i+1,j -2X i,j}
[0072] The min operation compares the residual values calculated by the two filters and selects the smallest residual value as the final residual value of the image at position (i,j). The max operation is the opposite of the min operation; it compares the residual values calculated by the two filters and selects the largest residual value as the final residual value of the image at position (i,j). The min and max operations not only introduce nonlinear residuals but also increase the diversity of the model. The main difference between the four types (Type 1 to Type 4) is that higher-order residuals contain more neighborhood information compared to lower-order residuals.
[0073] pass Figure 2 The preprocessing of the image using 15 high-pass filters not only reduces the influence of image content on features and captures the dependencies between different types of adjacent pixels, but also accelerates subsequent network convergence and improves network performance.
[0074] In S103, in one example, the statistical feature information includes the maximum value, minimum value, average value, and variance. The residual image obtained from processing the target image in S102 is input into the filtering sub-model of the image filtering model. The residual image is calculated using the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. These multiple statistical feature information can be features obtained by calculating the maximum value, minimum value, average value, and variance of multiple feature maps of the residual image. In a specific embodiment, the output multiple statistical feature information can be in the form of a matrix.
[0075] To better describe the image filtering method provided in this application, the specific implementation of S103 is described below with a specific embodiment.
[0076] To enable the image filtering model to support not only large-sized input images but also images of arbitrary sizes, large-sized convolutional kernels were selected in the network to extract information from a wider neighborhood, increase the network's receptive field, acquire features at different scales, and improve the global representation of the target image's features.
[0077] The input to the filtering sub-model is a residual image with 15 channels obtained from the preprocessing sub-model. Its basic structure is a residual connection structure, which alleviates the gradient vanishing problem and reduces the dimensionality of the image.
[0078] The filtering sub-model introduces an element extraction layer before the fully connected layer, resulting in a scalable network architecture. Since natural images possess self-similarity, the front of the filtering sub-model can be viewed as a "general feature extractor," while the element extraction layer adapts to different input image sizes. The statistical features of the feature maps, such as maximum, minimum, and variance, can indirectly reflect the size and resolution of the input image; for example, high-resolution images have smoothness characteristics, resulting in lower variance. On the other hand, modified images introduce significant noise, causing substantial changes in statistical features and significant differences. In the last 16 feature maps, the maximum, minimum, average, and variance are calculated for each. All 4x16 = 64 features are then input into the next layer, providing sufficient information for classification. Figure 3 As shown, Figure 3 The middle part is a convolutional network used for image classification. Figure 3 The Base part in the diagram is used to extract features from the image, and it mainly consists of layers that perform convolution operations. Here, stride is the step size for each slide in the convolution. Figure 3 The stride of the Base part is 2. (See reference) Figure 3 The network structure of the filtering sub-model shown is based on the residual image obtained from the preprocessing sub-model. The filtering sub-model uses three different sizes of convolutional kernels: 3x3, 5x5, and 7x7, to better capture information from a larger neighborhood. The numbers in square brackets in each layer represent the number of kernels in the convolutional layer. The 3x3 Conv stride 2 is a Conv layer with a stride of 2 and a 3x3 kernel. The Conv layer consists of a set of 3x3 filters and can be considered a 2D numerical matrix. The 1x1 Conv stride 2 works similarly. Figure 3 The input data is processed by convolution operations in the direction indicated by the arrows, and finally, 4x16 features are extracted as output. The 64 features output by the filtering sub-model can be in matrix form. In addition, the convolutional network includes pooling layers, which are mainly used for scaling and extracting high-dimensional features. One type of pooling is local pooling, where several adjacent points in the image dimension are reduced to a single output point, while remaining unchanged in the channel dimension. Pooling methods include average pooling (AvgPool), max pooling (MaxPool), and norm pooling (LpPool). These are mainly used for image scaling. Avg pool stride 2 is an average pooling layer with a stride of 2.
[0079] In S104, based on multiple statistical feature information output by the filtering sub-model, it is determined whether the target image has been modified. In one example, determining the filtering result of the target image based on multiple statistical feature information includes: inputting multiple statistical feature information into an image binary classifier to obtain the filtering result of the target image.
[0080] In one specific embodiment, multiple statistical feature information in matrix form is input into an image binary classifier to obtain the filtering results of the target image. The filtering results can be used to indicate whether the target image has been modified.
[0081] Image binary classifiers can be used to classify images into two categories. Binary classification: The classification task involves two classes, and each sample belongs to one of these classes, with a label of 0 or 1. For example, cat / dog binary classification. Output layer: Contains only one unit and uses the sigmoid function (which converts the output into a probability distribution between 0 and 1). Loss function: Binary cross-entropy loss. Label: The label for each sample is a scalar, either 0 or 1.
[0082] Based on the image filtering method provided in the above embodiments, correspondingly, as... Figure 4 As shown, this application embodiment provides an image filtering device 400, which may include:
[0083] Acquisition module 401 is used to acquire the target image;
[0084] The first calculation module 402 is used to input the target image into the preprocessing sub-model of the image filtering model, and calculate the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image.
[0085] The second calculation module 403 is used to input the residual image into the filtering sub-model of the image filtering model, and to calculate the residual image through the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image.
[0086] The determination module 404 is used to determine the filtering results of the target image based on multiple statistical feature information. The filtering results are used to indicate whether the target image should be modified.
[0087] In one embodiment, the first computing module may include:
[0088] The calculation unit is used to input the target image into the preprocessing sub-model of the image filtering model, and calculate the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image.
[0089] The determining unit is used to obtain a residual image of the target image, including multiple channels, based on the residual values of each pixel value of the target image.
[0090] In one embodiment, the computing unit may include:
[0091] The computational subunit is used to input the target image into the preprocessing submodel of the image filtering model. The pixel values of the target image are calculated by the N filters of the preprocessing submodel to obtain the residual values of each pixel value of the target image.
[0092] A sub-unit is defined to obtain a residual image of the target image, including N channels, based on the residual values of each pixel value of the target image.
[0093] In one embodiment, the computational subunit may be specifically used for:
[0094] The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are linearly and nonlinearly calculated by N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. The linear calculation includes convolving the filter and the pixel values of the target image. The nonlinear calculation includes comparing the residual values obtained by convolving the pixel values of different filters and the pixel values of the target image, and taking the maximum or minimum value of the convolved residual values as the residual value corresponding to the pixel value of the target image.
[0095] In one embodiment, the determining module may be specifically used for:
[0096] Multiple statistical features are input into an image binary classifier to obtain the selection results of the target image.
[0097] Based on the image filtering method and apparatus provided in the above embodiments, this application also provides an electronic device 500, such as... Figure 5 As shown:
[0098] It includes a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the computer program is executed by the processor 501, it implements the various processes of the above-described image screening method embodiments and achieves the same technical effect.
[0099] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0100] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0101] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.
[0102] The processor 501 implements any of the image filtering methods in the above embodiments by reading and executing computer program instructions stored in the memory 502.
[0103] In one example, the electronic device may also include a communication interface 503 and a bus 510. As an example, such as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0104] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0105] Bus 510 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0106] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described image screening method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0107] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0108] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0109] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0110] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0111] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. An image filtering method, characterized in that, include: Acquire the target image; The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated by multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. The maximum or minimum value of the residual values obtained for each pixel value is taken as the residual value corresponding to the pixel value of the target image. Based on the residual values of each pixel value of the target image, the residual image corresponding to the target image is obtained. The residual image is input into the filtering sub-model of the image filtering model. The residual image is calculated by the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image. Based on the multiple statistical features, the filtering result of the target image is determined, and the filtering result is used to indicate whether the target image has been modified.
2. The method according to claim 1, characterized in that, The statistical features include the maximum value, minimum value, average value, and variance.
3. The method according to claim 2, characterized in that, The step of inputting the target image into the preprocessing sub-model of the image filtering model, and calculating the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual image corresponding to the target image, includes: The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated by multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. Based on the residual values of each pixel value of the target image, a residual image of the target image including multiple channels is obtained.
4. The method according to claim 3, characterized in that, The preprocessing sub-model includes N filters, where N is an integer greater than 1; The step of inputting the target image into the preprocessing sub-model of the image filtering model, and calculating the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image, includes: The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are calculated by the N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. Based on the residual values of each pixel in the target image, a residual image of the target image including N channels is obtained.
5. The method according to claim 4, characterized in that, The step involves inputting the target image into the preprocessing sub-model of the image filtering model, and calculating the pixel values of the target image through N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image, including: The target image is input into the preprocessing sub-model of the image filtering model. The pixel values of the target image are linearly and nonlinearly calculated by N filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image. The linear calculation includes convolving the filter and the pixel values of the target image. The nonlinear calculation includes comparing the residual values obtained by convolving different filters and the pixel values of the target image, and taking the maximum or minimum value among the residual values obtained by convolution as the residual value corresponding to the pixel value of the target image.
6. The method according to claim 1, characterized in that, Determining the filtering result of the target image based on the multiple statistical feature information includes: The statistical feature information is input into an image binary classifier to obtain the filtering result of the target image.
7. An image filtering device, characterized in that, The device includes: The acquisition module is used to acquire the target image; The first calculation module is used to input the target image into the preprocessing sub-model of the image filtering model, calculate the pixel values of the target image through multiple filters of the preprocessing sub-model to obtain the residual values of each pixel value of the target image, and take the maximum or minimum value of the residual values obtained for each pixel value as the residual value corresponding to the pixel value of the target image, and obtain the residual image corresponding to the target image based on the residual values of each pixel value of the target image; The second calculation module is used to input the residual image into the filtering sub-model of the image filtering model, and to calculate the residual image through the convolution kernel and general feature extractor of the filtering sub-model to obtain multiple statistical feature information. The statistical feature information is used to reflect the size and resolution of the target image. The determining module is used to determine the filtering result of the target image based on the multiple statistical feature information, and the filtering result is used to indicate whether the target image has been modified.
8. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the image filtering method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the image screening method as described in any one of claims 1-6.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the image filtering method as described in any one of claims 1-6.