Method and device for detecting defects of a selenium drum, electronic equipment and storage medium
By using the NanoDet target detection model and the OpenVino CPU acceleration algorithm, the problems of low efficiency and high cost in traditional toner cartridge inspection are solved, and efficient and low-cost toner cartridge defect detection is achieved.
Patent Information
- Application Number
- CN202210790461.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-07-06
AI Technical Summary
Traditional toner cartridge defect detection relies on manual inspection, which is inefficient and costly. Traditional visual inspection algorithms are complex and have high image requirements, while GPU acceleration is expensive.
The NanoDet target detection model is trained and combined with the OpenVino CPU high-performance acceleration algorithm to achieve toner cartridge defect detection through deep learning. The lightweight model improves detection speed and reduces cost.
It improves the speed and efficiency of drum unit inspection, reduces inspection costs, avoids the high cost of GPUs, and enables effective inspection of complex images.
Smart Images

Figure CN115294024B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer printing technology, and in particular to a method, apparatus, electronic device, and storage medium for detecting defects in toner cartridges. Background Technology
[0002] A sophisticated AOI image defect visual inspection system automatically picks out OK / NG defects on the production line and classifies the defect types, reducing manual labor and increasing productivity.
[0003] For example, in LCD panel defect detection, deep learning-based LCD panel inspection uses a combination of backlight and coaxial light to acquire images of the LCD panel. During image scanning, the deep learning algorithm simultaneously processes the image, displaying real-time defect information. For defective glass, it triggers real-time shutdown of the main equipment to prevent production downtime due to glass breakage. Algorithm-wise, it can detect defects generated by various manufacturing processes of LCD panels. Targeted deep learning algorithm optimization effectively overcomes the problem of few-sample learning, enabling accurate detection and classification of different defect types, including edge chipping, cracks, breakage, scratches, water droplets, water stains, and photoresist residue. The detection rate increases with the number of defect samples. The deep learning model is loaded onto the GPU for inference.
[0004] Traditional toner cartridge defect detection relies primarily on human visual inspection, which is difficult, prone to fatigue, and prone to missed detections. This poses a significant challenge for companies in controlling production quality and improving efficiency. Traditional visual inspection emerged as a solution, but it has extremely high image quality requirements and complex algorithms. Even slight changes in the image or defect necessitate algorithm modifications, making code implementation very difficult. Deep learning was then applied for detection, but these models run very slowly on CPUs. Therefore, GPUs are typically used for acceleration, which, while faster, is expensive and increases production costs. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, electronic device, and storage medium for detecting defects in toner cartridges, thereby improving the speed and efficiency of toner cartridge detection and reducing detection costs.
[0006] One aspect of the present invention provides a method for detecting defects in a toner cartridge, comprising:
[0007] In response to a defect detection request, a first image of the toner cartridge is acquired, the first image being used to characterize a photograph of the printed paper;
[0008] The first image is tested using a toner cartridge defect detection model to obtain toner cartridge defect classification results.
[0009] The training of the toner cartridge defect detection model includes:
[0010] Acquire multiple second images, which are used to characterize images including defective toner cartridges;
[0011] The second image is labeled with defects, and a target detection model is trained to obtain the inference result;
[0012] The calculated results are post-processed using visual inspection to obtain the drum defect detection model.
[0013] According to the aforementioned drum defect detection method, the second image is labeled with defects, and a target detection model is trained to obtain the estimation result, including:
[0014] The NanoDet object detection model is divided into a first model and a second model to train the second image. The first model is used to train to represent point-like and block-like defects, and the second model is used to train to represent line-like and strip-like defects.
[0015] The NanoDet target detection model is trained by adjusting parameters and performing iterative training. The identification results of the obtained drum defect detection model are then detected until the identification results reach a preset value.
[0016] According to the aforementioned drum defect detection method, the NanoDet target detection model includes:
[0017] We use ShuffNetV2 as the backbone network and remove the last convolutional layer.
[0018] Furthermore, features with downsampling rates of 8 / 16 / 32 times are extracted and input into the pyramid attention network to perform multi-scale feature fusion, thereby obtaining the score and category of the drum defect detection box.
[0019] According to the aforementioned toner cartridge defect detection method, the identification result of the obtained toner cartridge defect detection model is detected until the identification result reaches a preset value, including:
[0020] The training parameters of the NanoDet object detection model are adjusted so that the loss function and the average AP value meet the preset values, whereby the average AP value is used as an indicator to characterize the detection accuracy.
[0021] According to the aforementioned drum defect detection method, the first image is subjected to detection using a drum defect detection model to obtain a drum defect classification result, including:
[0022] Using OpenVino for high-performance CPU acceleration of algorithm execution inference.
[0023] According to the aforementioned toner cartridge defect detection method, the post-processing of the calculated results through visual inspection includes:
[0024] The image of the calculated result is subjected to flat field correction, including taking a standard image under a stable light source, calculating the gray mean of the standard image, determining the difference map between the standard image and the gray mean, and subtracting the difference map from the image of each calculated result to obtain the flat field corrected image;
[0025] The flat field correction image is cropped using the defect detection box of the target detection to obtain the cropped image;
[0026] The cropped image is then subjected to median filtering to obtain a filtered image;
[0027] The filtered image is compressed according to its width and height to obtain a compressed image;
[0028] The extreme value information map is obtained by differentiating the compressed map. Then, the category of the drum defect is determined by the height distance or width distance directly between the extreme values. The category includes at least one of defect area, defect fraction and defect number.
[0029] According to the aforementioned method for detecting defects in toner cartridges, the method includes:
[0030] The categories of toner cartridge defects in the first image are visualized through an interactive interface.
[0031] Another aspect of the present invention provides a toner cartridge defect detection device, comprising:
[0032] The acquisition module is used to acquire a first image of the toner cartridge according to the defect detection request. The first image is used to represent the photograph of the printed paper.
[0033] The classification module is used to perform detection on the first image through the toner cartridge defect detection model to obtain the toner cartridge defect classification result;
[0034] The training module includes a data collection module, a defect identification training module, and a post-processing module.
[0035] The collection module is used to acquire multiple second images, which are used to characterize images including defective drum units;
[0036] The defect recognition training module is used to annotate defects in the second image and train a target detection model to obtain the inference result;
[0037] The post-processing module is used to perform post-processing on the calculation results through visual inspection to obtain the drum defect detection model.
[0038] Another aspect of the present invention provides an electronic device, including a processor and a memory;
[0039] The memory is used to store programs;
[0040] The processor executes the program to implement the method as described above.
[0041] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0042] The beneficial effects of this invention are as follows: It uses the ultra-lightweight NanoDet model in conjunction with OpenVino for object detection, resulting in fast computation speed and avoiding the high cost associated with using GPUs. Furthermore, it effectively detects complex images through deep learning algorithms, avoiding the cumbersome computation required for complex images in traditional algorithms. This improves the speed and efficiency of drum unit detection and reduces detection costs.
[0043] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0044] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0045] Figure 1 This is a flowchart illustrating the method of an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of the training process of the toner cartridge defect detection model according to an embodiment of the present invention.
[0047] Figure 3 This is a schematic diagram of the training process of the NanoDet object detection model according to an embodiment of the present invention.
[0048] Figure 4 This is a schematic diagram of a process for detecting defects in a toner cartridge according to an embodiment of the present invention.
[0049] Figure 5 This is a schematic diagram of the NanoDet target detection model according to an embodiment of the present invention.
[0050] Figure 6 This is a schematic diagram illustrating the training process of the target detection model according to an embodiment of the present invention.
[0051] Figure 7 This is a schematic diagram of the training loss function and mAP in an embodiment of the present invention.
[0052] Figure 8 This is a schematic diagram of the post-processing flow according to an embodiment of the present invention.
[0053] Figure 9 This is a filtering diagram according to an embodiment of the present invention.
[0054] Figure 10 This is a schematic diagram of the process for detecting defects in a PLC, vision inspection software, and toner cartridge according to an embodiment of the present invention.
[0055] Figure 11 This is a diagram of a toner cartridge defect detection and analysis device according to an embodiment of the present invention. Detailed Implementation
[0056] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0057] like Figure 1 As shown, this embodiment of the invention provides a flow chart of a toner cartridge defect detection method, which specifically includes, but is not limited to, steps S100-S200.
[0058] Step S100: In response to the defect detection request, acquire the first image of the toner cartridge;
[0059] In some embodiments, the first image is acquired by vision software at a preset angle from an image of the printed paper;
[0060] Step S200: The first image is detected using the drum defect detection model to obtain the drum defect classification result.
[0061] In some embodiments, refer to the appendix Figure 2 The training of the drum defect detection model includes, but is not limited to, steps S310 to S330:
[0062] Step S310: Acquire multiple second images, which are used to characterize images including defective drum units;
[0063] In some embodiments, reference Figure 3 It illustrates the training process using the NanoDet object detection model, including but not limited to steps S311 to S312:
[0064] Step S311: The NanoDet target detection model is divided into a first model and a second model to train the second image. The first model is used to train to represent point-like and block-like defects, and the second model is used to train to represent line-like and strip-like defects.
[0065] In some embodiments, reference Figure 4 The example illustrates a flowchart of a toner cartridge defect detection process. The first stage involves collecting a sufficient number of images, labeling the defects on the images, and then feeding the images into NanoDet (object detection model) for parameter tuning and training. After obtaining the model, it is then put online for detection. If detection errors occur, such as over-detection or under-detection, the images are collected again and the training continues, iterating repeatedly.
[0066] In some embodiments, the ultra-lightweight target detection model NanoDet is used, which has a fast detection speed, small model size, and balances accuracy, speed and size. NanoDet is a lightweight improvement based on the FCOS model.
[0067] Step S312: The NanoDet target detection model is trained by adjusting parameters and performing iterative training. The identification results of the obtained drum defect detection model are then detected until the identification results reach the preset value.
[0068] In some embodiments, reference Figure 5 The example illustrates the structure of a NanoDet object detection model. NanoDet's backbone is ShuffNetV2 1.0x (a network type), with the last convolutional layer removed. Features with downsampling rates of 8 / 16 / 32 times are extracted and input into PAN (pyramid attention network) for multi-scale feature fusion, ultimately yielding the score and category of the detection box.
[0069] Step S320: Defect annotation is performed on the second image, and the target detection model is trained to obtain the inference result;
[0070] In some embodiments, reference Figure 6 It discloses a flowchart of the training process for the object detection model, including but not limited to steps S321 to S322:
[0071] Step S321: Adjust the training parameters of the NanoDet object detection model so that the loss of the loss function and the average AP value meet the preset values. The average AP value is used as an indicator to characterize the detection accuracy.
[0072] In some embodiments, after image annotation, the images are fed into the network for training. The training parameters are adjusted to minimize the loss function and maximize mAP (mean average precision, a metric for object detection accuracy), resulting in the final model used for detection. The training loss function and mAP are as follows: Figure 7 As shown. To improve accuracy, point-like and strip-like defects are trained separately, hence two models are used.
[0073] Step S322: Use OpenVino to perform high-performance CPU acceleration algorithm execution inference.
[0074] In some embodiments, OpenVino is used for high-performance acceleration algorithm inference on Intel CPUs, which increases the running speed by more than five times and greatly reduces CPU consumption. Parallel computation is performed in the background during printing and photography, so this embodiment does not require expensive GPUs for hardware acceleration, which greatly saves costs for enterprises.
[0075] Step S330: Perform post-processing on the calculation results through visual inspection to obtain the drum defect detection model.
[0076] In some embodiments, reference Figure 8 It illustrates a post-processing flowchart, including but not limited to steps S331 to S335:
[0077] Step S331: Perform flat field correction on the calculated image, including taking a standard image under a stable light source, calculating the gray mean of the standard image, determining the difference map between the standard image and the gray mean, and subtracting the difference map from the image of each calculated result to obtain the flat field correction map.
[0078] In some embodiments, the image is first flattened. A standard image is taken on-site under a stable light source, the mean gray level of the image is calculated, and the difference image is obtained by subtracting the mean gray level from the standard image. During the program operation, the difference image is subtracted each time to obtain the flattened image.
[0079] Step S332: Using the defect detection box of the target detection, the flat field correction image is cropped to obtain the cropped image;
[0080] In some embodiments, the flat-field corrected image is cropped using the defect detection box of the target detection, which can reduce the amount of computation.
[0081] Step S333: Perform median filtering on the cropped image to obtain the filtered image;
[0082] In some embodiments, reference Figure 9 The example illustrates a filtered image, where median filtering is applied to two cropped images to remove unwanted noise, resulting in an image like this. Figure 9 The filtering diagram is shown.
[0083] Step S334: Compress the filtered image according to its width and height to obtain a compressed image;
[0084] In some embodiments, the width and height of the filtered image are compressed to 10 respectively to obtain an image with a width of 10 and a height equal to the cropped height, and an image with a height of 10 and a width equal to the cropped width, thus obtaining a compressed image.
[0085] Step S335: Differentiate the compressed image to obtain an extreme value information map, and then determine the type of drum defect by the height distance or width distance directly between the extreme values. The type includes at least one of defect area, defect fraction and defect number.
[0086] In some embodiments, the extreme value information map is obtained by differentiating the image of the compressed image, and then the sub-category of the defect is determined by the height distance or width distance directly between the extreme values.
[0087] In some embodiments, reference Figure 10 It illustrates a flowchart of the process for detecting defects in a PLC, vision inspection software, and toner cartridge, including image acquisition, TCP communication, print control, image algorithms, and algorithm acceleration.
[0088] like Figure 10 As shown, the vision software communicates with the PLC via TCP. Upon receiving relevant instructions, it checks the printer's status and returns statuses such as ready, paper feed, paper out, no toner, and offline. The PLC then responds to the printer based on the corresponding status. The software also controls the printer to print, delete print jobs, and clear statuses according to PLC instructions.
[0089] When the vision software receives a capture command, the camera acquires the image and feeds it into a deep learning network. Simultaneously, an Intel CPU performs inference, which is accelerated by the OpenVino framework, increasing its computational speed by more than five times. After obtaining the inference results, traditional vision methods are used for connected component analysis, calculating area, scores, and counting defects.
[0090] Figure 11This is a diagram of a toner cartridge defect detection and analysis device according to an embodiment of the present invention. The device includes a data acquisition module 1110, a classification module 1120, and a training module 1130. The training module 1130 includes a collection module 1131, a defect identification training module 1132, and a post-processing module 1133.
[0091] The system comprises the following modules: an acquisition module, which acquires a first image of the toner cartridge based on a defect detection request; a classification module, which performs defect detection on the first image using a toner cartridge defect detection model to obtain a toner cartridge defect classification result; and a training module, which includes a collection module, a defect recognition training module, and a post-processing module: the collection module acquires multiple second images, which represent images of toner cartridges containing defects; the defect recognition training module annotates the second images with defects and trains a target detection model to obtain a calculation result; and the post-processing module performs post-processing on the calculation result through visual detection to obtain a toner cartridge defect detection model.
[0092] Exemplarily, the acquisition module, classification module, and training module in the device enable the implementation of any of the aforementioned toner cartridge defect detection methods. Specifically, in response to a defect detection request, a first image of the toner cartridge is acquired; the first image is then used to perform detection using a toner cartridge defect detection model to obtain a toner cartridge defect classification result; the training of the toner cartridge defect detection model includes: acquiring multiple second images, which are used to represent images of toner cartridges containing defects; annotating the second images with defects and training them using a target detection model to obtain a calculation result; and performing post-processing on the calculation result through visual inspection to obtain the toner cartridge defect detection model. This improves the speed and efficiency of toner cartridge detection and reduces detection costs.
[0093] This invention also provides an electronic device, which includes a processor and a memory;
[0094] The memory stores the program;
[0095] The processor executes a program to perform the aforementioned toner cartridge defect detection method; the electronic device has the function of carrying and running the toner cartridge defect detection software system provided in the embodiments of the present invention, such as a personal computer (PC), mobile phone, smartphone, personal digital assistant (PDA), wearable device, handheld computer (PPC), tablet computer, etc.
[0096] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the toner cartridge defect detection method described above.
[0097] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.
[0098] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned toner cartridge defect detection method.
[0099] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0100] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0102] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0103] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0104] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0105] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0106] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method of detecting a defect of a selenium drum, characterized by, The method comprises the following steps: in response to a defect detection request, acquiring a first image of a toner cartridge, the first image being used to represent a photographed picture of a print paper; performing detection on the first image through a toner cartridge defect detection model to obtain a toner cartridge defect classification result; the training of the toner cartridge defect detection model comprises: obtaining a plurality of second images, the second images being used to represent images of toner cartridges with defects; performing defect labeling on the second images and training using a target detection model to obtain a calculation result; performing post-processing on the calculation result through visual detection to obtain the toner cartridge defect detection model; wherein the post-processing of the calculation result through visual detection comprises: performing flat field correction on the image of the calculation result, including photographing a standard image under a stable light source, calculating the gray mean value of the standard image, determining the difference image of the standard image minus the gray mean value, and obtaining the flat field correction image by subtracting the difference image from each of the images of the calculation result; cutting the flat field correction image through the defect detection frame of the target detection to obtain a cropped image; performing median filtering on the cropped image to obtain a filtered image; compressing the filtered image according to the width and height to obtain a compressed image; deriving the compressed image to obtain an extreme value information image, and then judging the category of the toner cartridge defect by the height distance or width distance of the extreme value, the category including at least one of defect area, defect score and defect number.
2. The method of claim 1, wherein the step of detecting the defect of the toner cartridge is performed by a method of detecting a defect of a toner cartridge according to any one of claims 2 to 6. The post-processing of the calculation result through visual detection comprises: dividing the second image into a first model and a second model using a NanoDet target detection model, the first model being used to represent point-like and block-like defect training, and the second model being used to represent line-like and strip-like defect training; adjusting parameters and performing cyclic training using the NanoDet target detection model to detect the recognition result of the obtained toner cartridge defect detection model until the recognition result reaches a preset value.
3. The method of claim 2, wherein the step of detecting the defect of the toner cartridge is performed by a method of detecting a defect of a toner cartridge according to any one of claims 1 to 2. The NanoDet target detection model comprises: using ShuffNetV2 as the backbone network and removing the last convolution layer; and extracting 8 / 16 / 32 times down-sampling rate features and inputting them into a pyramid attention network to perform multi-scale feature fusion to obtain the score and category of the toner cartridge defect detection frame.
4. The method of claim 2, wherein the step of detecting the defect of the toner cartridge is performed by a method of detecting a defect of a toner cartridge according to any one of claims 1 to 3. The post-processing of the calculation result through visual detection comprises: adjusting the training parameters of the NanoDet target detection model to make the loss of the loss function and the average AP value satisfy the preset value, the average AP value being used to represent the index of detection accuracy.
5. The method of claim 1, wherein the step of detecting the defect of the toner cartridge is performed by a method of detecting a defect of a toner cartridge according to any one of claims 2 to 4. The post-processing of the calculation result through visual detection comprises: using OpenVino to perform inference using a CPU high-performance acceleration algorithm.
6. The method of claim 1, wherein the step of detecting the defect of the toner cartridge is performed by a method of detecting a defect of a toner cartridge according to any one of claims 2 to 5. The method comprises: visualizing and displaying the category of the toner cartridge defect of the first image through an interactive interface.
7. A toner cartridge defect detection apparatus, characterized by comprising: The method comprises: The collection module is configured to collect a first image of the toner cartridge according to a defect detection request, the first image being used to represent a photographed picture of the printing paper; The classification module is configured to perform detection on the first image by using a toner cartridge defect detection model to obtain a toner cartridge defect classification result; The training module includes a collection module, a defect identification training module, and a post-processing module: The collection module is configured to obtain a plurality of second images, the second images being used to represent images of the toner cartridge with defects; The defect identification training module is configured to perform defect labeling on the second images and train a target detection model to obtain a calculation result; The post-processing module is configured to perform post-processing on the calculation result by using visual detection to obtain the toner cartridge defect detection model; The post-processing on the calculation result by using visual detection includes: Performing flat field correction on the images of the calculation result, including photographing a standard image under a stable light source, calculating a gray mean value of the standard image, determining a difference image of the standard image minus the gray mean value, and obtaining a flat field correction image by subtracting the difference image from each image of the calculation result; Performing cutting on the flat field correction image by using a defect detection frame of target detection to obtain a cropped image; Performing median filtering on the cropped image to obtain a filtered image; Compressing the filtered image according to the width and height to obtain a compressed image; Deriving the compressed image to obtain an extreme value information image, and then judging the category of the toner cartridge defect by using the height distance or the width distance of the extreme value directly, the category including at least one of a defect area, a defect score, and a defect number.
8. An electronic device, comprising: The processor and the memory are included; The memory is configured to store a program; The processor executes the program to implement the toner cartridge defect detection method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a program, and the program is executed by the processor to implement the toner cartridge defect detection method according to any one of claims 1-6.
Citation Information
Patent Citations
Equipment oil leakage detection method and device in dark light environment, equipment and storage medium
CN114519698A
Defect detection method, device and equipment and computer readable storage medium
CN114596243A
Apparatus and method for judging image
JP1996068764A