CN112732962A - Online real-time junk image category prediction method based on deep learning and Flink - Google Patents
Online real-time junk image category prediction method based on deep learning and Flink Download PDFInfo
- Publication number
- CN112732962A CN112732962A CN202110035236.9A CN202110035236A CN112732962A CN 112732962 A CN112732962 A CN 112732962A CN 202110035236 A CN202110035236 A CN 202110035236A CN 112732962 A CN112732962 A CN 112732962A
- Authority
- CN
- China
- Prior art keywords
- picture
- identified
- flink
- classification model
- category
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000013135 deep learning Methods 0.000 title claims abstract description 21
- 238000013145 classification model Methods 0.000 claims abstract description 58
- 238000007781 pre-processing Methods 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 20
- 238000012549 training Methods 0.000 claims description 23
- 230000006870 function Effects 0.000 claims description 17
- 238000010606 normalization Methods 0.000 claims description 6
- 238000013528 artificial neural network Methods 0.000 claims description 4
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 3
- 238000011156 evaluation Methods 0.000 claims description 3
- 238000011176 pooling Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 description 8
- 238000003491 array Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000007547 defect Effects 0.000 description 4
- 108091026890 Coding region Proteins 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000003197 catalytic effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- ZLIBICFPKPWGIZ-UHFFFAOYSA-N pyrimethanil Chemical compound CC1=CC(C)=NC(NC=2C=CC=CC=2)=N1 ZLIBICFPKPWGIZ-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/55—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses an online real-time junk picture category prediction method based on deep learning and Flink, which comprises the following steps: step 1, transmitting a junk picture to be identified to an object cloud storage OSS of a server; step 2, outputting the spam picture to be identified in the object cloud storage OSS to a message queue service Kafka for queue caching; step 3, outputting the spam picture to be identified cached in Kafka to Flink; step 4, preprocessing the garbage picture to be identified by a big data engine Flink; step 5, loading the trained picture classification model file and the subscript and picture category corresponding relation file by a big data engine Flink; identifying the category of the images of the garbage to be identified; and 6, after the big data engine Flink identifies the picture types, outputting the corresponding picture types. The method provided by the invention has strong robustness, has mass processing capability, is not limited by the picture specification, and can accurately predict the category of the junk picture for the user.
Description
Technical Field
The invention relates to the technical field of deep learning and Flink, in particular to an online real-time junk picture category prediction method based on the deep learning and the Flink.
Background
Deep Learning (DL) is an intrinsic rule and expression hierarchy of sample data, and information obtained in these Learning processes greatly helps interpretation of data such as text, image, and sound. The final aim of the method is to enable the machine to have the analysis and learning capability like a human, and to recognize data such as characters, images and sounds. Deep learning is a complex machine learning algorithm, and achieves the effect in speech and image recognition far exceeding the prior related art.
Apache Flink is an open source stream processing framework developed by the Apache software foundation, at the heart of which is a distributed stream data stream engine written in Java and Scala. Flink executes arbitrary stream data programs in a data parallel and pipelined manner, and Flink's pipelined runtime system can execute batch and stream processing programs. In addition, the Flink runtime itself also supports the execution of iterative algorithms. The memory processing and the pipeline mode are applied to the scene of on-line real-time processing, and can provide real-time processing capability for services.
Under the existing condition of garbage classification implementation, as the common people do not have so much idle time to learn the classification of each type of different garbage and the classification of the garbage to be thrown in by the different garbage, the garbage is thrown randomly, the garbage classification throwing is not well realized, the workload of sanitation workers is increased, and the environment is polluted. The traditional junk image category identification system has the following disadvantages: 1. the self-adaption performance is poor, and once the target image is polluted by stronger noise or the target image has larger defects, an ideal result cannot be obtained; 2. the processing capacity is limited, and massive picture category identification tasks cannot be processed in a short time; 3. the picture specification has a limit, and the size of the picture has a certain limit, and the picture data is generally required to be processed by a user in advance; 4. the accuracy is too low, the prediction category is limited, and the accuracy index is too low; at present, various online real-time garbage picture identification systems are not available in the market.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to solve the technical problem of providing an online real-time junk picture category prediction method based on deep learning and Flink aiming at the defects of the prior art, and the method utilizes a picture classification model of the deep learning and the massive real-time processing capacity of a big data engine Flink to process the request of a user for identifying the junk categories in real time.
In order to solve the technical problem, the invention discloses an online real-time prediction spam picture category method based on deep learning and Flink, which comprises the following specific steps:
step 1, transmitting junk picture information to be identified to an object cloud Storage OSS (object Storage service) of a server, wherein the junk picture information to be identified comprises an id of the junk picture to be identified and the junk picture to be identified;
step 2, outputting the spam picture information to be identified in the object cloud storage OSS to a message queue service Kafka for queue caching;
step 3, outputting the spam picture information to be identified cached in the message queue service Kafka to a big data engine Flink, wherein the Kafka plays a role in data caching, so that mass data are prevented from rushing into a Flink cluster at one time, and a Flink cluster server is prevented from being washed down;
step 4, preprocessing the spam picture information to be identified by a big data engine Flink; the preprocessing includes picture format conversion, picture size reset, and conversion into CHW channel data.
And 5, loading the trained picture classification model and the file with the subscript and picture category corresponding relation into a big data engine Flink, and applying the big data engine Flink to picture category identification. Loading the CHW channel data of the picture preprocessed in the step 4, inputting the CHW channel data into a picture classification model, outputting corresponding picture category subscripts, and outputting picture categories by using the corresponding relation between the subscripts and the picture categories;
and 6, after the big data engine Flink identifies the picture type, outputting the id of the garbage picture to be identified, the corresponding picture id and the picture type.
In one implementation, step 4 includes:
step 4-1, converting the junk image information to be identified into a byte code array, and generating a buffered image object by using a read function of ImageIO for loading into a memory;
step 4-2, loading the byte code array of the junk pictures to be identified into a memory, and handing the buffer image object to a ColorProcessor for processing;
step 4-3, converting the picture object into an RGB (Red-Green-Blue ) format of the picture by a convertToRGB method of a Colorprocessor;
step 4-4, resetting the picture object converted into the RGB format to be 331 × 331 in size through a resize function of the ColorProcessor; the size of the picture object converted into the RGB format is set to 331 × 331 so as to fit the picture classification model data input format;
step 4-5, obtaining CHW (Channel-Height-Width) Channel arrays of the picture objects with the reset sizes, obtaining the Channel number through a getNChannels function of the Colorprocessor, further obtaining the arrays of all the channels, and combining the CHW three-Channel arrays;
step 4-6, converting the CHW channel array into an HWC channel array, adjusting the coding sequence of the CHW channel array and converting the CHW channel array into the HWC channel array; the CHW channel array is converted into the HWC channel array in order to be matched with the data input format of the picture classification model;
and 4-7, outputting the id of the garbage picture to be identified and the HWC channel array.
And 4, preprocessing the junk picture information to be recognized, the junk picture information is not limited by picture specifications, the picture can be preprocessed for the user in millisecond level without manual preprocessing of the user no matter the size of the picture, and the time consumed for preprocessing the picture by the big data engine flight is within 500 ms.
In one implementation, step 5 comprises:
step 5-1, loading a pre-trained picture classification model file and a subscript and picture category corresponding relation file by a big data engine Flink;
step 5-2, inputting the id of the garbage picture to be identified and the HWC channel array in the step 4-7 into a picture classification model, performing class prediction on the garbage picture to be identified, and outputting subscripts;
step 5-3, matching the picture type corresponding to the subscript from the subscript and picture type corresponding relation file;
in one implementation, after the trained picture classification model file in the step 5-1 is used for completing the training of the picture classification model, the picture classification model is stored in the picture classification model file.
In one implementation, before training the image classification model, data preprocessing needs to be performed on a pre-training image data set, including:
step 5-1-1, adjusting the size of the picture in the pre-training picture data set, and zooming to the range of [360, 480] at random in an equal proportion according to the shorter side of the picture to obtain a zoomed picture;
step 5-1-2, horizontally and vertically turning the zoomed pictures, randomly cutting pictures with the size of 331 x 331, turning and cutting the same picture in the pre-training picture data set to obtain 32 primary pre-processing pictures for pre-training;
step 5-1-3, carrying out normalization processing on the obtained preliminary preprocessing picture to obtain a preprocessing picture; and inputting the preprocessed pictures into the picture classification model for training.
The data preprocessing is carried out on the pre-training picture data set so as to eliminate irrelevant information in the image, enhance the accuracy of picture classification and simplify data to the maximum extent.
In one implementation, the step 5-1-3 normalizes the obtained preliminary pre-processed picture to obtain data of each channel of the obtained pre-processed picture HWC, and subtracts an average value of each channel. By using the normalization processing mode, the characteristics of the picture data can be normalized to the same value range, the value of the picture data is distributed near 0, the picture noise is reduced, the picture classification model can be more easily and correctly converged to the optimal solution, and the picture classification accuracy is improved.
In one implementation mode, the picture classification model selects a nasnet model as an integral structure of the picture classification model, an original output layer of the nasnet model is removed, on the basis, a global average pooling layer, a relu function, a dropout function, a softmax function and a picture classification model output layer are added, and the output number of the picture classification model output layer is consistent with the category number of the garbage pictures so as to fit the classification and identification of the garbage pictures;
selecting the weight information of the ImageNet model, and setting each layer of neural network to be trainable;
an Adam optimizer is selected, a category _ cross loss function is selected, a picture classification model is trained at a rate of 1e-5, and accuracy is used as an evaluation index.
The image classification model modifies the model structure on the basis of the existing nasnet image classification model, conforms to the class output of garbage image classification, and uses the weight of the existing ImageNet model, so that the training time consumption is greatly reduced when the model is pre-trained, and the model convergence is quickly achieved. After the training of the picture classification model is completed, when the garbage picture to be recognized is predicted, even if the garbage picture to be recognized is polluted by strong noise or the garbage picture to be recognized has large defects, the picture classification model can deduce the category of the current picture according to the picture characteristics.
In one implementation manner, the spam picture to be identified in the step 1 is obtained by shooting with a shooting device, and the shooting device is not limited to a mobile phone and a camera; the resolution of the junk pictures to be identified is not limited.
Has the advantages that:
1. the method provided by the application has strong robustness, and even if the target image is polluted by strong noise or the target image has large defects, the neural network for image recognition can deduce the category of the current image according to the image characteristics; the method has massive processing capacity, and the Flink can process millions or hundreds of millions of pictures at the second level under the effect of memory and cluster; the method is not limited by the specification of the picture, and the picture can be preprocessed for the user in millisecond level no matter the size of the picture, so that the manual preprocessing of the user is not needed; the accuracy rate is high, under the support of the deep learning technology, the accuracy rate of identifying the picture category can reach 93%, and the picture category can be accurately predicted for a user.
2. According to the method and the device, the category of the junk picture uploaded by the user each time can be accurately predicted by utilizing the picture category identification in the deep learning field and the Flink mass data processing capacity. The ability of processing rubbish picture classification is provided on line in real time, the throwing in of rubbish by common people is facilitated, the classification of sanitation workers to rubbish is facilitated, and the pollution of harmful rubbish to the environment is reduced.
Drawings
The above and other advantages of the present invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is an overall flow diagram of an online real-time spam picture recognition system;
FIG. 2 is a flow chart of real-time processing and prediction of picture classes on the Flink line;
FIG. 3 is a diagram of a picture pre-processing flow of a picture classification model;
FIG. 4 is a flowchart of a picture classification model training process;
fig. 5 is a flow chart of a method provided herein.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
Please refer to fig. 5, which is a flowchart of a method provided by the present application, including:
step 1, transmitting junk picture information to be identified to an object cloud storage OSS of a server, wherein the junk picture information to be identified comprises an id of the junk picture to be identified and the junk picture to be identified; in this embodiment, the junk pictures to be identified are obtained by shooting with a shooting device, and the shooting device is not limited to a mobile phone and a camera; the resolution of the junk pictures to be identified is not limited.
Step 2, outputting the spam picture information to be identified in the object cloud storage OSS to a message queue service Kafka for queue caching;
step 3, outputting the spam picture information to be identified cached in the message queue service Kafka to Flink;
step 4, preprocessing the spam picture information to be identified by a big data engine Flink; the preprocessing includes picture format conversion, picture size reset, and conversion into CHW channel data.
And 5, loading the trained picture classification model and the file with the subscript and picture category corresponding relation into a big data engine Flink, and applying the big data engine Flink to picture category identification. Loading the CHW channel data of the picture preprocessed in the step 4, inputting the CHW channel data into a picture classification model, outputting corresponding picture category subscripts, and outputting picture categories by using the corresponding relation between the subscripts and the picture categories;
and 6, after the big data engine Flink identifies the picture type, outputting the id of the garbage picture to be identified, the corresponding picture id and the picture type.
In this embodiment, please refer to fig. 1, which is a flowchart of an overall online real-time spam image recognition system, where a user provides information about spam images to be delivered, which are taken by a camera device such as a mobile phone, and the information is uploaded to an object cloud storage OSS of a server and further output to a message queue service Kafka, then, a large data cluster of Flink is used to perform image preprocessing, a image classification model and a relationship between a subscript and a category are loaded, and image category prediction is performed to output an image category and return the category of the spam images, so as to help the user complete spam classification.
In this embodiment, please refer to fig. 2, which is a process of a spam picture to be identified entering a Flink big data cluster. Step 4 comprises the following steps:
and 4-1, loading the junk pictures to be identified from the Flink Source component into a picture byte array, and outputting the picture byte array to a FlatMap function for picture preprocessing. In the preprocessing process, converting the garbage picture information to be identified into a byte code array, and generating a buffered image object by using a read function of ImageIO for loading into a memory;
step 4-2, loading the byte code array of the garbage picture to be identified into a memory, delivering the buffer image object to a ColorProcessor for processing,
4-3, converting the picture into an RGB format; converting the picture object into the RGB format of the picture by using a convertToRGB method of a Colorprocessor;
step 4-4, resetting the picture object converted into the RGB format to be 331 × 331 in size by a resize method of a ColorProcessor;
step 4-5, obtaining CHW channel arrays of the picture objects with the reset sizes, obtaining the number of channels by a getNChannels method of a ColorProcessor, further obtaining the arrays of all the channels, and combining the CHW three-channel arrays;
step 4-6, carrying out normalization processing, converting the CHW channel array into an HWC channel array, adjusting the coding sequence of the CHW channel array and converting the CHW channel array into the HWC channel array;
and 4-7, outputting the id of the junk picture to be identified and the HWC channel array to a model FlatMap.
In this embodiment, step 5 includes:
step 5-1, loading a pre-trained picture classification model file and a subscript and picture category corresponding relation file in model prediction;
step 5-2, inputting the image id and HWC channel array in the step 4-7 into a picture classification model, performing class prediction on a garbage picture to be identified, and outputting subscripts;
and 5-3, matching the picture type corresponding to the subscript from the subscript and picture type corresponding relation file.
In this embodiment, after the trained image classification model file in step 5-1 is the image classification model, the image classification model is saved in the image classification model file.
In this embodiment, please refer to fig. 3, which is a process of image preprocessing for an image classification model, including:
step 5-1-1, adjusting the size of the picture in the pre-training picture data set, and zooming to the range of [360, 480] at random in an equal proportion according to the shorter side of the picture to obtain a zoomed picture;
step 5-1-2, horizontally and vertically turning the zoomed pictures, randomly cutting pictures with the size of 331 x 331, turning and cutting the same picture in the pre-training picture data set to obtain 32 primary pre-processing pictures for pre-training;
step 5-1-3, carrying out normalization processing on the obtained preliminary preprocessing picture to obtain a preprocessing picture; and inputting the preprocessed pictures into the picture classification model for training.
In this embodiment, the normalization processing on the obtained preliminary preprocessed picture in steps 5-1-3 is to subtract the average value of each channel from the data of each channel of the obtained preprocessed picture HWC.
In this embodiment, please refer to fig. 4, which is a process of training a picture classification model. After the pictures are processed as shown in fig. 3, the picture classification model selects a nasnet model as an integral structure of the picture classification model, an original output layer of the nasnet model is removed, on the basis, a global average pooling layer, a relu function, a dropout function, a softmax function and a picture classification model output layer are added, and the output number of the picture classification model output layer is consistent with the category number of the garbage pictures; selecting the weight information of the ImageNet model, and setting each layer of neural network to be trainable; selecting an Adam optimizer, selecting a catalytic _ cross loss function, training a picture classification model at a rate of 1e-5, and taking accuracy as an evaluation index; and after the image classification model is trained, storing the model into a model file, and providing the model file for online Flink real-time prediction.
The present invention provides a method for predicting spam image category on line in real time based on deep learning and Flink, and the method and the way for implementing the technical scheme are many, and the above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. All the components not specified in the present embodiment can be realized by the prior art.
Claims (8)
1. The method for predicting the category of the spam images on line in real time based on deep learning and Flink is characterized by comprising the following steps:
step 1, transmitting junk picture information to be identified to an object cloud storage OSS of a server, wherein the junk picture information to be identified comprises an id of the junk picture to be identified and the junk picture to be identified;
step 2, outputting the spam picture information to be identified in the object cloud storage OSS to a message queue service Kafka for queue caching;
step 3, outputting the spam picture information to be identified cached in the message queue service Kafka to a big data engine Flink;
step 4, preprocessing the garbage picture information to be identified by a big data engine Flink;
step 5, loading the trained picture classification model file and the subscript and picture category corresponding relation file by a big data engine Flink; identifying the category of the images of the garbage to be identified;
and 6, after the big data engine Flink finishes the identification of the picture type, outputting the id of the garbage picture to be identified and the corresponding picture type.
2. The method for predicting the category of the spam image on the line in real time based on the deep learning and Flink according to claim 1, wherein the step 4 comprises the following steps:
step 4-1, converting the junk picture information to be identified into a byte code array;
step 4-2, loading the byte code array of the junk pictures to be identified into a memory;
4-3, converting the garbage picture object to be identified into an RGB format;
step 4-4, the picture object converted into the RGB format is reset to be 331 × 331 in size;
step 4-5, obtaining a CHW channel array of the picture object with the reset size;
step 4-6, converting the CHW channel array into an HWC channel array;
and 4-7, outputting an id and HWC channel array of the junk pictures to be identified.
3. The method for predicting the category of the spam picture on the line in real time based on the deep learning and Flink according to claim 1, wherein the step 5 comprises the following steps:
step 5-1, loading a pre-trained picture classification model file and a subscript and picture category corresponding relation file by a big data engine Flink;
step 5-2, inputting the id of the garbage picture to be identified and the HWC channel array in the step 4-7 into a picture classification model, performing class prediction on the garbage picture to be identified, and outputting subscripts;
and 5-3, matching the picture type corresponding to the subscript from the subscript and picture type corresponding relation file.
4. The method for predicting the category of the spam image on line in real time based on the deep learning and Flink according to claim 3, wherein the trained image classification model file in the step 5-1 stores the image classification model into the image classification model file after the training of the image classification model is completed.
5. The method for on-line real-time prediction of spam image classification based on deep learning and Flink according to claim 4, wherein before the training of the image classification model, the pre-training image data set needs to be pre-processed, comprising:
step 5-1-1, adjusting the size of the picture in the pre-training picture data set, and zooming to the range of [360, 480] at random in an equal proportion according to the shorter side of the picture to obtain a zoomed picture;
step 5-1-2, horizontally and vertically turning the zoomed pictures, randomly cutting the turned pictures into pictures with the size of 331 x 331, turning and cutting the same picture in the pre-training picture data set to obtain 32 primary pre-processing pictures;
step 5-1-3, carrying out normalization processing on the obtained preliminary preprocessing picture to obtain a preprocessing picture; and inputting the preprocessed pictures into the picture classification model for training.
6. The method for on-line real-time prediction of spam image category based on deep learning and Flink according to claim 5, wherein the step 5-1-3 normalizes the obtained preliminary pre-processed image to obtain data of each channel of the obtained pre-processed image HWC, and subtracts the average value of each channel.
7. The method according to claim 4, wherein the image classification model adopts a nasnet model as an integral structure of the image classification model, and removes an original output layer of the nasnet model, and on the basis, a global average pooling layer, a relu function, a dropout function, a softmax function and an image classification model output layer are added, and the number of the output layers of the image classification model is consistent with the number of the classes of the garbage images;
selecting the weight information of the ImageNet model, and setting each layer of neural network to be trainable;
an Adam optimizer is selected, a category _ cross loss function is selected, a picture classification model is trained at a rate of 1e-5, and accuracy is used as an evaluation index.
8. The method for predicting the class of spam pictures on line in real time based on deep learning and Flink according to claim 1, wherein the spam picture to be identified in step 1 is obtained by shooting with a camera device, and the camera device is not limited to a mobile phone and a camera; the resolution of the junk pictures to be identified is not limited.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110035236.9A CN112732962B (en) | 2021-01-12 | 2021-01-12 | Online real-time garbage picture category prediction method based on deep learning and Flink |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110035236.9A CN112732962B (en) | 2021-01-12 | 2021-01-12 | Online real-time garbage picture category prediction method based on deep learning and Flink |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112732962A true CN112732962A (en) | 2021-04-30 |
CN112732962B CN112732962B (en) | 2023-10-13 |
Family
ID=75590365
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110035236.9A Active CN112732962B (en) | 2021-01-12 | 2021-01-12 | Online real-time garbage picture category prediction method based on deep learning and Flink |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112732962B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114048336A (en) * | 2021-11-19 | 2022-02-15 | 厦门市美亚柏科信息股份有限公司 | Distributed intelligent analysis method and device for massive multimedia pictures |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106115104A (en) * | 2016-06-27 | 2016-11-16 | 湖南现代环境科技股份有限公司 | Categorized consumer waste collecting and transferring system based on Internet of Things, devices and methods therefor |
CN109493604A (en) * | 2018-11-30 | 2019-03-19 | 平安科技(深圳)有限公司 | Utilize the traffic control method, apparatus and computer equipment of big data |
CN109994183A (en) * | 2019-02-15 | 2019-07-09 | 忻州师范学院 | A kind of intellectual analysis personal health condition and dietotherapy medical system |
CN110163233A (en) * | 2018-02-11 | 2019-08-23 | 陕西爱尚物联科技有限公司 | A method of so that machine is competent at more complex works |
CN110162556A (en) * | 2018-02-11 | 2019-08-23 | 陕西爱尚物联科技有限公司 | A kind of effective method for playing data value |
CN110232336A (en) * | 2019-05-28 | 2019-09-13 | 成都谷辘信息技术有限公司 | A kind of deviation safety on line early warning system |
WO2020040110A1 (en) * | 2018-08-23 | 2020-02-27 | 荏原環境プラント株式会社 | Information processing device, information processing program, and information processing method |
CN110929760A (en) * | 2019-10-30 | 2020-03-27 | 中国科学院自动化研究所南京人工智能芯片创新研究院 | Garbage classification software based on computer vision |
CN111126138A (en) * | 2019-11-18 | 2020-05-08 | 施博凯 | AI image recognition method for garbage classification |
CN111259977A (en) * | 2020-01-22 | 2020-06-09 | 浙江工业大学 | Garbage classification device based on deep learning |
CN111275599A (en) * | 2020-02-03 | 2020-06-12 | 重庆特斯联智慧科技股份有限公司 | Big data integration algorithm-based group rental house early warning method and device, storage medium and terminal |
CN111352800A (en) * | 2020-02-25 | 2020-06-30 | 京东数字科技控股有限公司 | Big data cluster monitoring method and related equipment |
CN111597173A (en) * | 2020-04-02 | 2020-08-28 | 上海瀚之友信息技术服务有限公司 | Data warehouse system |
CN111738357A (en) * | 2020-07-24 | 2020-10-02 | 完美世界(北京)软件科技发展有限公司 | Junk picture identification method, device and equipment |
-
2021
- 2021-01-12 CN CN202110035236.9A patent/CN112732962B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106115104A (en) * | 2016-06-27 | 2016-11-16 | 湖南现代环境科技股份有限公司 | Categorized consumer waste collecting and transferring system based on Internet of Things, devices and methods therefor |
CN110163233A (en) * | 2018-02-11 | 2019-08-23 | 陕西爱尚物联科技有限公司 | A method of so that machine is competent at more complex works |
CN110162556A (en) * | 2018-02-11 | 2019-08-23 | 陕西爱尚物联科技有限公司 | A kind of effective method for playing data value |
WO2020040110A1 (en) * | 2018-08-23 | 2020-02-27 | 荏原環境プラント株式会社 | Information processing device, information processing program, and information processing method |
CN109493604A (en) * | 2018-11-30 | 2019-03-19 | 平安科技(深圳)有限公司 | Utilize the traffic control method, apparatus and computer equipment of big data |
CN109994183A (en) * | 2019-02-15 | 2019-07-09 | 忻州师范学院 | A kind of intellectual analysis personal health condition and dietotherapy medical system |
CN110232336A (en) * | 2019-05-28 | 2019-09-13 | 成都谷辘信息技术有限公司 | A kind of deviation safety on line early warning system |
CN110929760A (en) * | 2019-10-30 | 2020-03-27 | 中国科学院自动化研究所南京人工智能芯片创新研究院 | Garbage classification software based on computer vision |
CN111126138A (en) * | 2019-11-18 | 2020-05-08 | 施博凯 | AI image recognition method for garbage classification |
CN111259977A (en) * | 2020-01-22 | 2020-06-09 | 浙江工业大学 | Garbage classification device based on deep learning |
CN111275599A (en) * | 2020-02-03 | 2020-06-12 | 重庆特斯联智慧科技股份有限公司 | Big data integration algorithm-based group rental house early warning method and device, storage medium and terminal |
CN111352800A (en) * | 2020-02-25 | 2020-06-30 | 京东数字科技控股有限公司 | Big data cluster monitoring method and related equipment |
CN111597173A (en) * | 2020-04-02 | 2020-08-28 | 上海瀚之友信息技术服务有限公司 | Data warehouse system |
CN111738357A (en) * | 2020-07-24 | 2020-10-02 | 完美世界(北京)软件科技发展有限公司 | Junk picture identification method, device and equipment |
Non-Patent Citations (3)
Title |
---|
SIYANG LU等: "Detecting Anomaly in Big Data System Logs Using Convolutional Neural Network", 《HTTPS://IEEEXPLORE.IEEE.ORG/ABSTRACT/DOCUMENT/8511880》, pages 151 - 158 * |
董子源等: "基于卷积神经网络的垃圾图像分类算法", 《计算机***应用》, pages 199 - 204 * |
郭晋凯等: "基于安全更新视图的XML更新控制方法", 《计算机应用》, pages 3409 - 3412 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114048336A (en) * | 2021-11-19 | 2022-02-15 | 厦门市美亚柏科信息股份有限公司 | Distributed intelligent analysis method and device for massive multimedia pictures |
Also Published As
Publication number | Publication date |
---|---|
CN112732962B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11138903B2 (en) | Method, apparatus, device and system for sign language translation | |
CN109461446B (en) | Method, device, system and storage medium for identifying user target request | |
US10601740B1 (en) | Chatbot artificial intelligence | |
CN109514586B (en) | Method and system for realizing intelligent customer service robot | |
CN111012261A (en) | Sweeping method and system based on scene recognition, sweeping equipment and storage medium | |
CN112183166B (en) | Method and device for determining training samples and electronic equipment | |
US20240029436A1 (en) | Action classification in video clips using attention-based neural networks | |
CN110288085B (en) | Data processing method, device and system and storage medium | |
CN112995690B (en) | Live content category identification method, device, electronic equipment and readable storage medium | |
CN113778871A (en) | Mock testing method, device, equipment and storage medium | |
CN111970400B (en) | Crank call identification method and device | |
CN115129848A (en) | Method, device, equipment and medium for processing visual question-answering task | |
CN115130711A (en) | Data processing method and device, computer and readable storage medium | |
CN112732962B (en) | Online real-time garbage picture category prediction method based on deep learning and Flink | |
CN113344453A (en) | Risk monitoring method, device, system, storage medium and equipment | |
CN111914068B (en) | Method for extracting test question knowledge points | |
CN117592778A (en) | Risk early warning system | |
CN108596068B (en) | Method and device for recognizing actions | |
CN114241253A (en) | Model training method, system, server and storage medium for illegal content identification | |
CN113688989A (en) | Deep learning network acceleration method, device, equipment and storage medium | |
CN109871487B (en) | News recall method and system | |
KR102326745B1 (en) | Control method, device and system for login of platform service | |
CN116778534B (en) | Image processing method, device, equipment and medium | |
CN117575894B (en) | Image generation method, device, electronic equipment and computer readable storage medium | |
CN114708467B (en) | Bad scene identification method, system and equipment based on knowledge distillation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |