CN114913176A - Flexible leather material scab defect detection method and system based on artificial intelligence - Google Patents

Flexible leather material scab defect detection method and system based on artificial intelligence Download PDF

Info

Publication number
CN114913176A
CN114913176A CN202210838383.4A CN202210838383A CN114913176A CN 114913176 A CN114913176 A CN 114913176A CN 202210838383 A CN202210838383 A CN 202210838383A CN 114913176 A CN114913176 A CN 114913176A
Authority
CN
China
Prior art keywords
image
pixel point
leather
difference
gray level
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
Application number
CN202210838383.4A
Other languages
Chinese (zh)
Other versions
CN114913176B (en
Inventor
王桂花
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Qihang Luggage Co ltd
Original Assignee
Jiangsu Qihang Luggage Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Qihang Luggage Co ltd filed Critical Jiangsu Qihang Luggage Co ltd
Priority to CN202210838383.4A priority Critical patent/CN114913176B/en
Publication of CN114913176A publication Critical patent/CN114913176A/en
Application granted granted Critical
Publication of CN114913176B publication Critical patent/CN114913176B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/803Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of input or preprocessed data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a method and a system for detecting scabies defects of a flexible leather material based on artificial intelligence, wherein a surface gray scale image of leather to be detected is preprocessed to obtain a surface gray scale image; obtaining a difference image according to the surface gray image and the standard image; carrying out gray level quantization on the difference image to obtain a difference quantization image; clustering each gray level channel to obtain a plurality of clusters; acquiring a first fusion vector of each first pixel point and the nearest cluster in each gray level channel in the difference quantization image, and a leather maximum difference vector of a target pixel point and the nearest cluster in each gray level channel; and calculating the similarity between the first fusion vector and the second fusion vector of each first pixel point to obtain a leather difference value symbiotic image, and finally combining the surface image to be detected and a semantic segmentation network to obtain a defect detection result, thereby solving the technical problem that noise points and texture features similar to the scabies defect are easily identified as scabies by mistake.

Description

Flexible leather material scab defect detection method and system based on artificial intelligence
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a system for detecting scabies defects of a flexible leather material based on artificial intelligence.
Background
The flexible leather material is a commonly used material for products in daily life, has very wide application, can be seen everywhere in the daily life, and is an indispensable daily product in modern life in the aspects of leather shoes, purses, automobile cushions, leather chairs, leather bags and the like. However, the leather processing raw materials often have defects of different sizes and types, such as scratches, ringworm, scabies, wormholes, scars and the like, which are various defects generated in the process of animal growth to manufacturing, and the final finished product quality of leather can be affected by directly processing the leather raw materials, so that the defects of the leather processing raw materials need to be inspected in the leather processing production process, so that the defects are avoided in the process of pattern layout and cutting processing, and the quality of leather products is improved.
Most of the traditional leather surface defect detection is to detect the defects on the leather surface by professional detection personnel and mark the defects. The manual marking of leather defects belongs to empirical operation, a skilled technician with abundant experience is used for inspecting the whole leather one by one, a marking pen is used for marking defect points by various geometric symbols, each leather needs 6-10 minutes, high concentration is needed, the mental and physical consumption is high, and more small defects which are missed in marking can be caused.
At present, the detection method for the leather surface defects also adopts a semantic segmentation network to classify the defects in the leather image to be detected.
In practice, the inventors found that the above prior art has the following disadvantages:
since the semantic segmentation graph network labels the mange area on the leather by means of manual labeling, but since the manual labeling method focuses more on pixel characteristics, noise points or areas with certain texture characteristics similar to mange defects in the image are often mistakenly identified as mange areas.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method and a system for detecting the scab defect of a flexible leather material based on artificial intelligence, and the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an artificial intelligence-based method for detecting a mange defect in a flexible leather material, the method including:
acquiring a surface image to be detected of leather to be detected, and preprocessing the surface image to be detected to obtain a surface gray scale map;
obtaining a difference image by subtracting the gray average value of the surface gray image and a standard image, wherein the standard image is a surface image of the flawless leather; carrying out gray level quantization on the difference image to obtain a difference quantization image, wherein the difference quantization image is composed of different gray level channels;
clustering each gray level channel to obtain a plurality of clusters;
for each first pixel point in the difference quantization image, a cluster which is closest to the first pixel point in each gray level channel is a first cluster, and a leather pixel difference vector is obtained according to a vector from the first pixel point to each first cluster; fusing all leather pixel difference vectors corresponding to the first pixel point to obtain a first fusion vector;
obtaining a target pixel point in the difference value quantization image, wherein the target pixel point is a corresponding pixel point with the largest pixel value in the difference value image; the cluster which is closest to the target pixel point in each gray level channel is a second cluster; obtaining a leather maximum difference vector according to the vector from the target pixel point to each second cluster; fusing all the leather maximum difference vectors corresponding to each target pixel point to obtain a second fusion vector;
calculating the similarity between the first fusion vector and the second fusion vector of each first pixel point to obtain a leather difference value symbiotic image;
inputting the surface image to be detected and the leather difference value symbiosis image into a semantic segmentation network to obtain a defect detection result;
the step of clustering each gray level channel to obtain a plurality of clusters comprises:
and adopting a mean shift clustering algorithm for each gray level channel to find a plurality of clustering centers in each gray level channel, wherein the number of the clustering centers is the number of clusters obtained by clustering, and a plurality of clusters in each gray level channel are obtained.
Further, the step of fusing all leather pixel difference vectors corresponding to each first pixel point to obtain a first fusion vector includes: multiplying all the pixel difference vectors by respective weights to obtain a first fusion vector; the weight is a ratio of the number of pixels of the first cluster corresponding to the corresponding pixel difference vector to the total number of pixels of all the first clusters.
Further, the step of fusing the maximum difference vectors of all leathers corresponding to each target pixel point to obtain a second fused vector comprises: multiplying all the leather maximum difference vectors by respective weights to obtain a second fusion vector; and the weight is the ratio of the number of pixels of the second cluster corresponding to the maximum difference vector of the corresponding leather to the total number of pixels of all the second clusters.
Further, the method for calculating the similarity between the first fusion vector of each first pixel point and the second fusion vector of the target pixel point adopts cosine similarity.
Further, the step of preprocessing the surface image to be detected to obtain a surface gray scale image comprises: graying the surface image to be detected to obtain an initial gray image; and carrying out histogram equalization processing on the initial gray level image to obtain the surface gray level image.
Further, the step of calculating the similarity between the first fused vector and the second fused vector of each first pixel point further includes: when a plurality of target pixel points exist, calculating a second fusion vector of each target pixel point, and calculating the similarity between each second fusion vector and each first fusion vector according to the average value of the second fusion vectors of all the target pixel points.
Further, the step of obtaining a cluster closest to the first pixel point in each gray scale channel as a first cluster includes: and searching a cluster center which is closest to the first pixel point in a corresponding gray level channel by taking the first pixel point as a center, wherein a cluster corresponding to the cluster center is the first cluster.
In a second aspect, the embodiment of the present invention further provides an artificial intelligence-based flexible leather material mange defect detection system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the above methods when executing the computer program.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention discloses a flexible leather material mange defect detection method based on artificial intelligence, which obtains a difference image between a surface image to be detected and a standard image of a defect-free leather area, quantizes the difference image to obtain a quantized image, clusters pixel points of each gray level in the quantized image to obtain a plurality of clusters, calculates a first fusion vector between each pixel point in the quantized image and the nearest cluster in each gray level and a second fusion vector between a target pixel point in the quantized image and the nearest cluster in each gray level, calculates the similarity between the first fusion vector and the second fusion vector to obtain a leather difference value symbiotic image taking the similarity as a pixel value, takes the leather difference value symbiotic image and the surface image to be detected as the input of a semantic segmentation network, and takes the leather difference value symbiotic image as the supervision information of the semantic segmentation network to enable the network to pay more attention to the area with larger similarity, the attention degree of the region with small similarity is reduced, the result output by the semantic segmentation network is more accurate, and the technical problem that noise points and texture features similar to scabies defects are easily identified as scabies in the prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for detecting scabies defects in a flexible leather material based on artificial intelligence according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention for achieving the predetermined objects, the following detailed description of the method and system for detecting scabies defect of flexible leather material based on artificial intelligence according to the present invention with reference to the accompanying drawings and preferred embodiments thereof will be made in detail. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the flexible leather material scab defect detection method and system based on artificial intelligence in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for detecting scabies defects of a flexible leather material based on artificial intelligence according to an embodiment of the present invention is shown, where the method includes:
and S001, acquiring a surface image to be detected of the leather to be detected, and preprocessing the surface image to be detected to obtain a surface gray scale map.
The surface image to be measured is an image of the leather surface acquired by a camera, and the optimal angle of the acquired surface image to be measured is that the optical axis of the camera is vertical to the leather surface. The advantage of the image acquired at the angle is that the leather with scabies defects on the surface can be imaged clearly in the image of the surface to be measured, and the image does not interfere with the normal leather area.
The method comprises the steps of preprocessing a surface image to be detected before defect monitoring, wherein the preprocessing comprises the steps of graying the surface image to be detected to obtain an initial gray-scale image, and performing histogram equalization processing on the initial gray-scale image to obtain a surface gray-scale image. The histogram is adopted to carry out equalization processing on the initial gray level image, so that the overall brightness of the image can be improved, and the texture details in the image can be fully displayed.
S002, obtaining a difference image by subtracting the gray average value of the surface gray image and the standard image, wherein the standard image is the surface image of the flawless leather; and carrying out gray level quantization on the difference image to obtain a difference quantization image, wherein the difference quantization image consists of different gray level channels.
In order to obtain a more accurate gray level average value, the gray level average value of the standard image is the average value of the gray levels of a plurality of preprocessed standard images. Specifically, the step of preprocessing the standard image is the same as the step of preprocessing the surface image to be detected, that is, graying the plurality of standard images to obtain a standard grayscale image, and performing histogram equalization on the standard grayscale image to obtain a standard surface grayscale image. Number of standard surface gray scale maps is recorded as
Figure DEST_PATH_IMAGE001
And the number of pixels included in each standard surface grayscale image is recorded as
Figure DEST_PATH_IMAGE002
The first step
Figure DEST_PATH_IMAGE003
In a standard surface gray scale image
Figure DEST_PATH_IMAGE004
The pixel value of each pixel point is recorded as
Figure DEST_PATH_IMAGE005
And the mean gray scale value of the standard image is recorded as
Figure DEST_PATH_IMAGE006
Then, there are:
Figure DEST_PATH_IMAGE007
in the embodiments of the present invention
Figure 395245DEST_PATH_IMAGE001
The value of (1) is 100, and in other embodiments, the number of the standard images may be selected according to actual requirements.
The pixel value of each pixel point in the difference image is the difference value between each corresponding pixel point and the gray level in the surface gray level image. Specifically, the surface gray scale map is
Figure 374702DEST_PATH_IMAGE003
The pixel value of each pixel point is recorded as
Figure DEST_PATH_IMAGE008
In the difference map
Figure 544652DEST_PATH_IMAGE003
The pixel value of each pixel point is recorded as
Figure DEST_PATH_IMAGE009
Then, there are:
Figure DEST_PATH_IMAGE010
the difference image is quantized into corresponding gray scale to obtain a difference quantization image, and color blocks and textures belonging to different gray scales are presented in the difference quantization image. Specifically, the gray values of different levels are placed in different gray level channels in the difference quantization map, and the levels of the gray values and the gray level channels are in a one-to-one correspondence relationship; in other words, the gray values of the pixels in one gray scale channel are the same, and the number of divided gray scales is equal to the number of gray scale channels. And obtaining a complete difference quantization image after overlapping the pixels of all the gray level channels. In the embodiment of the present invention, the quantization is seven gray levels, that is, there are seven gray level channels, and in other embodiments, different gray levels can be quantized according to requirements.
As an example, the quantization mode is rounding down, assuming that the maximum difference of the gray values in the difference map is 40, the gray value in the difference map is divided into 7 levels, the corresponding gray value interval is obtained after rounding down, the pixel point with the gray value in the interval [0,5] is quantized into the first gray level, the pixel point with the gray value in the interval [6,11] is quantized into the second gray level, the pixel point with the gray value in the interval [12,17] is quantized into the third gray level, the pixel point with the gray value in the interval [18,22] is quantized into the fourth gray level, the pixel point with the gray value in the interval [23,28] is quantized into the fifth gray level, the pixel point with the gray value in the interval [29,34] is quantized into the sixth gray level, the pixel point with the gray value in the interval [35,40] is quantized into the seventh gray level, the levels correspond to the gray value of [1 in turn, 7].
And step S003, clustering each gray level channel to obtain a plurality of clusters.
And the clustering mode adopts a mean shift clustering algorithm to find the clustering center of each pixel point. The specific implementation process of the mean shift clustering algorithm comprises the following steps: sliding window based algorithms find dense areas. The radius r of the sliding window and the randomly selected pixel point are used as a central point C, a circular area with the central point C as the center and the radius r is used as the sliding window, and sliding is started in the corresponding gray level channel; calculating the average value of vectors from all pixel points to the central point in each sliding window to obtain the offset mean value of each sliding window, and moving the central point to the position of the offset mean value; in particular, will be described in
Figure DEST_PATH_IMAGE011
As a central point, to
Figure DEST_PATH_IMAGE012
Sliding window of radius is noted
Figure DEST_PATH_IMAGE013
In the sliding window
Figure 68691DEST_PATH_IMAGE003
Each pixel point is marked as
Figure DEST_PATH_IMAGE014
The number of pixels contained in the sliding window is recorded as
Figure DEST_PATH_IMAGE015
And the mean of the shifts are recorded as
Figure DEST_PATH_IMAGE016
Then, there are:
Figure DEST_PATH_IMAGE017
and moving the central point of the sliding window, and calculating the density of the pixel points in the sliding window until no direction exists to enable the sliding window to contain more points, namely the density of the pixel points of the sliding window is not increased any more. Wherein the time will be at
Figure DEST_PATH_IMAGE018
The window center in the state is recorded as
Figure DEST_PATH_IMAGE019
Time of day
Figure DEST_PATH_IMAGE020
The window center in the state is recorded as
Figure DEST_PATH_IMAGE021
At the time of day
Figure 978004DEST_PATH_IMAGE018
The mean shift of the window under the state is recorded as
Figure DEST_PATH_IMAGE022
Then, there are:
Figure DEST_PATH_IMAGE023
when a plurality of sliding windows are overlapped, the window with the maximum density is reserved, the window center is a cluster center, and the number of the cluster centers is the number of clusters obtained by clustering, namely the number of cluster categories.
By adopting the clustering method, a plurality of clusters can be obtained in each gray level channel, different gray levels have different clusters, and the gray levels in each cluster are the same, namely the pixel values in each cluster are the same.
Step S004, for each first pixel point in the difference quantization image, a cluster which is closest to the first pixel point in each gray level channel is a first cluster, and a leather pixel difference vector is obtained according to a vector from the first pixel point to each first cluster; and fusing all leather pixel difference vectors corresponding to each first pixel point to obtain a first fusion vector.
Because the texture on the normal leather surface is the natural texture formed by animals in the growing period, when the area without the scabies defect exists, the first fusion vectors among the pixel points are similar, namely, a similar distribution rule exists around each pixel point. The scabies defect area is formed because the skin is unhaired and pustule grows due to the livestock tinea, scabs are formed on the surface of the leather or are formed on the surface of the leather after various skin diseases are healed, the scabies are usually in a scab shape or a longan shape, and the scabies on the surface of the leather have obvious visual difference with the normal texture; that is, when the scabies defect exists, the distribution situation around the scabies defect pixel is obviously different from the distribution situation around the normal leather pixel. Therefore, whether the gray level distribution rule of the target pixel point suspected to be the scab defect is similar to the gray level distribution rule of the pixel point surrounding the normal area is compared to determine that the target pixel point belongs to the scab defect pixel point.
Specifically, since the leather pixel difference vectors in each gray scale channel are obtained in the same way, the second one
Figure 984487DEST_PATH_IMAGE003
The steps of obtaining the leather pixel difference vector in each gray level channel are as follows: centered on the first pixel point
Figure 579417DEST_PATH_IMAGE003
Single gray scale gateSearching a cluster center closest to the first pixel point in the road, namely calculating the distance between the cluster center of each cluster and the coordinate position of the first pixel point, and marking the cluster corresponding to the cluster center with the minimum distance as a first cluster; obtaining the first cluster in which the coordinate position of the first pixel point is taken as a starting point
Figure DEST_PATH_IMAGE024
Vector with coordinate position of each pixel point as terminal point
Figure DEST_PATH_IMAGE025
And recording the number of the pixel points in the first cluster as
Figure DEST_PATH_IMAGE026
And the obtained vector sequence from the first pixel point to all the pixel points in the first cluster is recorded as
Figure DEST_PATH_IMAGE027
The first step
Figure 824322DEST_PATH_IMAGE003
The leather pixel difference vector for each gray level channel is recorded as
Figure DEST_PATH_IMAGE028
Then, there are:
Figure DEST_PATH_IMAGE029
the step of obtaining the first fusion vector by fusion comprises the following steps: multiplying all the leather pixel difference vectors by respective weights to obtain a first fusion vector; the weight is the ratio of the number of pixels of the first cluster corresponding to the corresponding pixel difference vector to the total number of pixels of all the first clusters.
Specifically, will be
Figure 683081DEST_PATH_IMAGE003
The number of pixels in the first cluster in each gray scale channel is noted
Figure DEST_PATH_IMAGE030
The number of gray scale channels is noted
Figure DEST_PATH_IMAGE031
The first step
Figure 863396DEST_PATH_IMAGE003
The weight of the leather pixel difference vector corresponding to each gray level channel is recorded as
Figure DEST_PATH_IMAGE032
Then, there are:
Figure DEST_PATH_IMAGE033
the more the number of pixels in the first cluster is, the larger the proportion of the total number of pixels in all the first clusters is, which indicates that more pixels with corresponding gray levels are closest to the first pixel, so that the weight of the corresponding leather pixel difference vector is higher.
Fusing all leather pixel difference vectors of the first pixel point to obtain a first fusion vector, and recording the first fusion vector as a
Figure DEST_PATH_IMAGE034
Then, there are:
Figure DEST_PATH_IMAGE035
and obtaining a first fusion vector of each pixel point in the difference quantization image by adopting the same method.
Step S005, obtaining a target pixel point in the difference quantization image, wherein the target pixel point is the corresponding pixel point with the largest pixel value in the difference image; the cluster closest to the target pixel point in each gray level channel is a second cluster; obtaining a leather maximum difference vector according to the vector from the target pixel point to each second cluster; and fusing all the leather maximum difference vectors corresponding to each target pixel point to obtain a second fusion vector.
Due to the difference betweenThe gray value of the scabies area in the value map is higher than that of the normal area, namely, the color is brighter and lighter visually, so that the probability that the point with the largest gray value in the difference map is the scabies defect pixel point is higher, the part of pixel points are obtained, the coordinate positions of the part of pixel points are obtained, and the pixel points of the corresponding coordinate positions are found in the difference quantization map as target pixel points through the coordinate positions; finding the cluster closest to the target pixel point in each gray level channel of the difference quantization image as a second cluster to obtain a first cluster in the second cluster by taking the target pixel point as a starting point
Figure DEST_PATH_IMAGE036
Vector with coordinate position of each pixel point as terminal point
Figure DEST_PATH_IMAGE037
And recording the number of the pixel points in the first cluster as
Figure DEST_PATH_IMAGE038
And the obtained vector sequences from the target pixel point to all the pixel points in the second cluster are recorded as
Figure DEST_PATH_IMAGE039
First, a
Figure 910068DEST_PATH_IMAGE003
The maximum difference vector of the leather for each gray level channel is recorded as
Figure DEST_PATH_IMAGE040
Then, there are:
Figure DEST_PATH_IMAGE041
the step of obtaining the second fusion vector by fusion comprises the following steps: multiplying the maximum difference vectors of all the leathers by the respective weights to obtain a second fusion vector; the weight is the ratio of the number of pixels of the second cluster corresponding to the corresponding maximum difference vector to the total number of pixels of all the second clusters.
In particular toTo be compared with
Figure 102540DEST_PATH_IMAGE003
The number of pixels in the second cluster in each gray scale channel is noted
Figure DEST_PATH_IMAGE042
The first step
Figure 750559DEST_PATH_IMAGE003
The weight of the leather maximum difference vector corresponding to each gray level channel is recorded as
Figure DEST_PATH_IMAGE043
Then, there are:
Figure DEST_PATH_IMAGE044
the larger the number of pixels in the second cluster is, the larger the proportion of the pixels in the total number of pixels in all the second clusters is, which indicates that more pixels with corresponding gray levels are closest to the target pixel, and therefore the weight of the corresponding leather maximum difference vector is higher.
Step S006, calculating the similarity between the first fusion vector of each first pixel point and the second fusion vector of the target pixel point to obtain a leather difference value symbiotic image.
And calculating the cosine similarity between the first fusion vector of each first pixel point and the second fusion vector of the target pixel point. Traversing each first pixel point in the difference image, and calculating the cosine similarity between each first pixel point and the target pixel point, namely, each first pixel point corresponds to one cosine similarity, so as to obtain a leather difference symbiotic image taking the cosine similarity as the pixel value of the pixel point.
Preferably, when a plurality of target pixel points exist, the second fusion vector of each target pixel point is calculated, and the similarity between each second fusion vector and each first fusion vector is calculated according to the average value of the second fusion vectors of all the target pixel points.
The cosine similarity can reflect the similarity of the two vectors, the spatial relation and distribution of normal leather pixels and scab pixels in the leather difference quantization diagram can be well reflected through the cosine similarity, and the greater the similarity is, the greater the possibility that the corresponding first pixel point has scab defects is; the smaller the similarity is, the less the possibility that the corresponding first pixel point is a scab defect.
And step S007, inputting the surface image to be detected and the leather difference value symbiotic image into a semantic segmentation network to obtain a defect detection result.
In the detection process, the surface image to be detected and the leather difference value symbiosis image are simultaneously input into the semantic segmentation network to obtain a detection result, and if a scab area exists in the surface image to be detected, the semantic segmentation result can obtain a corresponding semantic area of the scab area.
The semantic segmentation network adopts a two-input single-output coding and decoding structure, namely a neural network adopting two encoders and a decoder structure, and the training process of the semantic segmentation network comprises the following steps: the method comprises the steps of taking a surface image to be detected as a sample image, labeling different types of scabies areas in the sample image, labeling pixel points of scabies defect areas as 1, labeling pixel points of normal leather areas as 0, taking the sample image with the labels as the input of one encoder and the leather symbiotic image as the input of the other encoder in a semantic segmentation network, taking feature graphs extracted by the two encoders as the input of a decoder, and outputting a final segmentation result by the decoder. The loss function adopted by the semantic segmentation network is a cross entropy loss function. Adam is used as an optimization algorithm to optimize weight and deviation parameters of the neural network.
In the semantic segmentation network, labels are information for artificially labeling different types of defects, the labels are used as supervision information to enable the network to pay more attention to gray level difference between pixel values, and the leather difference value symbiotic image is used as the supervision information to enable the network to increase the attention to pixel points with larger similarity and reduce the attention to pixel points with smaller similarity.
In conclusion, the embodiment of the invention discloses a method for detecting the scab defect of a flexible leather material based on artificial intelligence, the method obtains a difference image between a surface image to be measured and a standard image of a non-defective leather area, quantizes the difference image to obtain a quantized image, clustering pixel points of each gray level in a quantized image to obtain a plurality of clusters, calculating a first fusion vector between each pixel point in the quantized image and the nearest cluster in each gray level and a second fusion vector between a target pixel point in the quantized image and the nearest cluster in each gray level, calculating the similarity between the first fusion vector and the second fusion vector to obtain a leather difference value symbiotic image taking the similarity as a pixel value, and taking the leather difference value symbiotic image and a surface image to be measured as the input of a semantic segmentation network, so that the output result of the semantic segmentation network is more accurate. The technical problem that noise points and texture features similar to scabies defects are easily identified as scabies in the prior art is solved.
Based on the same inventive concept as that of the foregoing method embodiment, another embodiment of the present invention further provides an artificial intelligence-based flexible leather material scab defect detection system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the artificial intelligence-based flexible leather material scab defect detection method according to any one of the foregoing embodiments when executing the computer program, where the artificial intelligence-based flexible leather material scab defect detection method has been described in detail in the foregoing embodiments, and is not described again.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (5)

1. A detection method for scabies defects of a flexible leather material based on artificial intelligence is characterized by comprising the following steps:
acquiring a surface image to be detected of leather to be detected, and preprocessing the surface image to be detected to obtain a surface gray scale map;
obtaining a difference image by subtracting the gray average value of the surface gray image and a standard image, wherein the standard image is a surface image of the flawless leather; carrying out gray level quantization on the difference image to obtain a difference quantization image, wherein the difference quantization image is composed of different gray level channels;
clustering each gray level channel to obtain a plurality of clusters;
for each first pixel point in the difference quantization image, a cluster which is closest to the first pixel point in each gray level channel is a first cluster, and a leather pixel difference vector is obtained according to a vector from the first pixel point to each first cluster; fusing all leather pixel difference vectors corresponding to the first pixel point to obtain a first fusion vector;
obtaining a target pixel point in the difference value quantization image, wherein the target pixel point is a corresponding pixel point with the largest pixel value in the difference value image; the cluster closest to the target pixel point in each gray level channel is a second cluster; obtaining a leather maximum difference vector according to the vector from the target pixel point to each second cluster; fusing all the leather maximum difference vectors corresponding to each target pixel point to obtain a second fusion vector;
calculating the similarity between the first fusion vector and the second fusion vector of each first pixel point to obtain a leather difference value symbiotic image;
inputting the surface image to be detected and the leather difference value symbiosis image into a semantic segmentation network to obtain a defect detection result;
the step of clustering each gray level channel to obtain a plurality of clusters comprises:
adopting a mean shift clustering algorithm for each gray level channel to find a plurality of clustering centers in each gray level channel, wherein the number of the clustering centers is the number of clusters obtained by clustering, and a plurality of clusters in each gray level channel are obtained;
the step of fusing all leather pixel difference vectors corresponding to each first pixel point to obtain a first fusion vector comprises the following steps:
multiplying all the pixel difference vectors by respective weights to obtain a first fusion vector; the weight is the ratio of the number of the pixels of the first cluster corresponding to the corresponding pixel difference vector to the total number of the pixels of all the first clusters;
the step of fusing all the leather maximum difference vectors corresponding to each target pixel point to obtain a second fusion vector comprises the following steps:
multiplying all the leather maximum difference vectors by respective weights to obtain a second fusion vector; the weight is the ratio of the number of pixels of a second cluster corresponding to the corresponding leather maximum difference vector to the total number of pixels of all the second clusters;
the method for calculating the similarity between the first fusion vector of each first pixel point and the second fusion vector of the target pixel point adopts cosine similarity.
2. The method for detecting the scall defect of the flexible leather material based on the artificial intelligence as claimed in claim 1, wherein the step of preprocessing the surface image to be detected to obtain a surface gray scale map comprises:
graying the surface image to be detected to obtain an initial gray image;
and carrying out histogram equalization processing on the initial gray level image to obtain the surface gray level image.
3. The method as claimed in claim 1, wherein the step of calculating the similarity between the first fused vector and the second fused vector of each first pixel point further comprises: when a plurality of target pixel points exist, calculating a second fusion vector of each target pixel point, and calculating the similarity between each second fusion vector and each first fusion vector according to the average value of the second fusion vectors of all the target pixel points.
4. The method for detecting scabies defects of flexible leather materials based on artificial intelligence as claimed in claim 1, wherein said obtaining step of the cluster closest to said first pixel point in each gray level channel as the first cluster comprises: and searching a cluster center closest to the first pixel point in a corresponding gray level channel by taking the first pixel point as a center, wherein a cluster corresponding to the cluster center is the first cluster.
5. An artificial intelligence based flexible leather material mange defect detection system comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the method according to any one of claims 1 to 4.
CN202210838383.4A 2022-07-18 2022-07-18 Flexible leather material scab defect detection method and system based on artificial intelligence Active CN114913176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210838383.4A CN114913176B (en) 2022-07-18 2022-07-18 Flexible leather material scab defect detection method and system based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210838383.4A CN114913176B (en) 2022-07-18 2022-07-18 Flexible leather material scab defect detection method and system based on artificial intelligence

Publications (2)

Publication Number Publication Date
CN114913176A true CN114913176A (en) 2022-08-16
CN114913176B CN114913176B (en) 2022-09-13

Family

ID=82772403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210838383.4A Active CN114913176B (en) 2022-07-18 2022-07-18 Flexible leather material scab defect detection method and system based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN114913176B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082722A (en) * 2022-08-22 2022-09-20 四川金信石信息技术有限公司 Equipment defect detection method, system, terminal and medium based on forward sample
CN116152242A (en) * 2023-04-18 2023-05-23 济南市莱芜区综合检验检测中心 Visual detection system of natural leather defect for basketball
CN116309671A (en) * 2023-05-23 2023-06-23 浩珂科技有限公司 Geosynthetic fabric quality detection system
CN116486091A (en) * 2023-06-26 2023-07-25 尚宁智感(北京)科技有限公司 Fan blade defect area rapid segmentation method and system based on artificial intelligence
CN116580021A (en) * 2023-07-03 2023-08-11 湖南益友新材料有限公司 Environment-friendly concrete carbon reduction product production and quality detection method
CN116977338A (en) * 2023-09-25 2023-10-31 湖南自兴智慧医疗科技有限公司 Chromosome case-level abnormality prompting system based on visual semantic association
CN117689657A (en) * 2024-02-02 2024-03-12 深圳市福源晖科技有限公司 Flexible circuit board patch abnormality detection method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9578320B1 (en) * 2014-01-03 2017-02-21 Marvell International Ltd. Methods and apparatus for defect correction in image sensor outputs
CN113554629A (en) * 2021-07-28 2021-10-26 江苏苏桥焊材有限公司 Strip steel red rust defect detection method based on artificial intelligence
CN114332091A (en) * 2022-03-16 2022-04-12 武汉市金航艺精装印务有限公司 Printed matter defect detection method based on artificial intelligence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9578320B1 (en) * 2014-01-03 2017-02-21 Marvell International Ltd. Methods and apparatus for defect correction in image sensor outputs
CN113554629A (en) * 2021-07-28 2021-10-26 江苏苏桥焊材有限公司 Strip steel red rust defect detection method based on artificial intelligence
CN114332091A (en) * 2022-03-16 2022-04-12 武汉市金航艺精装印务有限公司 Printed matter defect detection method based on artificial intelligence

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082722B (en) * 2022-08-22 2022-11-01 四川金信石信息技术有限公司 Equipment defect detection method, system, terminal and medium based on forward sample
CN115082722A (en) * 2022-08-22 2022-09-20 四川金信石信息技术有限公司 Equipment defect detection method, system, terminal and medium based on forward sample
CN116152242A (en) * 2023-04-18 2023-05-23 济南市莱芜区综合检验检测中心 Visual detection system of natural leather defect for basketball
CN116309671A (en) * 2023-05-23 2023-06-23 浩珂科技有限公司 Geosynthetic fabric quality detection system
CN116309671B (en) * 2023-05-23 2023-08-11 浩珂科技有限公司 Geosynthetic fabric quality detection system
CN116486091B (en) * 2023-06-26 2023-09-26 尚宁智感(北京)科技有限公司 Fan blade defect area rapid segmentation method and system based on artificial intelligence
CN116486091A (en) * 2023-06-26 2023-07-25 尚宁智感(北京)科技有限公司 Fan blade defect area rapid segmentation method and system based on artificial intelligence
CN116580021A (en) * 2023-07-03 2023-08-11 湖南益友新材料有限公司 Environment-friendly concrete carbon reduction product production and quality detection method
CN116580021B (en) * 2023-07-03 2023-09-22 湖南益友新材料有限公司 Environment-friendly concrete carbon reduction product production and quality detection method
CN116977338A (en) * 2023-09-25 2023-10-31 湖南自兴智慧医疗科技有限公司 Chromosome case-level abnormality prompting system based on visual semantic association
CN116977338B (en) * 2023-09-25 2023-12-12 湖南自兴智慧医疗科技有限公司 Chromosome case-level abnormality prompting system based on visual semantic association
CN117689657A (en) * 2024-02-02 2024-03-12 深圳市福源晖科技有限公司 Flexible circuit board patch abnormality detection method and system
CN117689657B (en) * 2024-02-02 2024-04-16 深圳市福源晖科技有限公司 Flexible circuit board patch abnormality detection method and system

Also Published As

Publication number Publication date
CN114913176B (en) 2022-09-13

Similar Documents

Publication Publication Date Title
CN114913176B (en) Flexible leather material scab defect detection method and system based on artificial intelligence
CN115311270B (en) Plastic product surface defect detection method
CN110097554B (en) Retina blood vessel segmentation method based on dense convolution and depth separable convolution
CN112446891B (en) Medical image segmentation method based on U-Net network brain glioma
CN108399420B (en) Visible light ship false alarm rejection method based on deep convolutional network
CN114758185B (en) Injection molding parameter control method and system based on gray level chromatic aberration
CN114897896B (en) Building wood defect detection method based on gray level transformation
CN114170228A (en) Computer image edge detection method
CN116137036B (en) Gene detection data intelligent processing system based on machine learning
CN115082719B (en) Wood quality grading method
CN116843692B (en) Regenerated active carbon state detection method based on artificial intelligence
CN116030237A (en) Industrial defect detection method and device, electronic equipment and storage medium
CN109285147B (en) Image processing method and device for breast molybdenum target calcification detection and server
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN111815563B (en) Retina optic disc segmentation method combining U-Net and region growing PCNN
CN111539320B (en) Multi-view gait recognition method and system based on mutual learning network strategy
CN116912261A (en) Plastic mold injection molding surface defect detection method
CN116309599A (en) Water quality visual monitoring method based on sewage pretreatment
CN113674231B (en) Method and system for detecting iron scale in rolling process based on image enhancement
KR20180063869A (en) Method, apparatus and computer program stored in computer readable medium for state decision of image data
CN114080644A (en) System and method for diagnosing small bowel cleanliness
CN112419278A (en) Deep learning-based solid wood floor classification method
CN115393634B (en) Small sample target real-time detection method based on migration learning strategy
CN114299567B (en) Model training method, living body detection method, electronic device, and storage medium
CN113763343B (en) Deep learning-based Alzheimer's disease detection method and computer-readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Method and System for Detecting Scabies Defects in Flexible Leather Materials Based on Artificial Intelligence

Effective date of registration: 20230620

Granted publication date: 20220913

Pledgee: Jiangsu Qidong rural commercial bank Co.,Ltd. Huilong sub branch

Pledgor: JIANGSU QIHANG LUGGAGE Co.,Ltd.

Registration number: Y2023980044903

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20220913

Pledgee: Jiangsu Qidong rural commercial bank Co.,Ltd. Huilong sub branch

Pledgor: JIANGSU QIHANG LUGGAGE Co.,Ltd.

Registration number: Y2023980044903