TWI786555B - Pattern identification and classification method and system - Google Patents

Pattern identification and classification method and system Download PDF

Info

Publication number
TWI786555B
TWI786555B TW110107027A TW110107027A TWI786555B TW I786555 B TWI786555 B TW I786555B TW 110107027 A TW110107027 A TW 110107027A TW 110107027 A TW110107027 A TW 110107027A TW I786555 B TWI786555 B TW I786555B
Authority
TW
Taiwan
Prior art keywords
neural network
images
plate
image
standard
Prior art date
Application number
TW110107027A
Other languages
Chinese (zh)
Other versions
TW202234290A (en
Inventor
李松沛
Original Assignee
寶元數控股份有限公司
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 寶元數控股份有限公司 filed Critical 寶元數控股份有限公司
Priority to TW110107027A priority Critical patent/TWI786555B/en
Priority to CN202110520095.XA priority patent/CN114998635A/en
Publication of TW202234290A publication Critical patent/TW202234290A/en
Application granted granted Critical
Publication of TWI786555B publication Critical patent/TWI786555B/en

Links

Images

Classifications

    • 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

一種板片辨識分類方法,適用於一運算裝置,並包含下列步驟:(A)於相關於該板片的一分析影像中取複數辨識影像。(B)使用一神經網路,該神經網路根據每一辨識影像輸出一特徵值組,每一特徵值組具有複數特徵值。(C)將該等特徵值組各自與一標準特徵值組比較,並根據比較結果判斷該板片之分類,該標準特徵值組具有複數分別對應於該等特徵值之標準特徵值。藉此,不僅可以大幅提升辨識分類的精確度,也能大幅降低更新維護辨識軟體的時間及成本。A pattern recognition and classification method is applicable to a computing device, and includes the following steps: (A) taking plural recognition images from an analysis image related to the pattern. (B) A neural network is used, and the neural network outputs a set of feature values according to each recognized image, and each set of feature values has a plurality of feature values. (C) comparing each of the characteristic value groups with a standard characteristic value group, and judging the classification of the plate according to the comparison result, the standard characteristic value group having a plurality of standard characteristic values respectively corresponding to the characteristic values. In this way, not only can the accuracy of identification and classification be greatly improved, but also the time and cost of updating and maintaining identification software can be greatly reduced.

Description

板片辨識分類方法及系統Pattern identification and classification method and system

本發明是有關於一種辨識分類方法及系統,特別是指一種板片辨識分類方法及系統。The present invention relates to an identification and classification method and system, in particular to a plate identification and classification method and system.

在目前的家具材料自動化產線中,作為家具材料之板片在出廠前,需進行辨識分類以確保出廠之貨品正確。In the current automated production line of furniture materials, the panels used as furniture materials need to be identified and classified before they leave the factory to ensure that the products shipped are correct.

由於板片通常面積較大,例如,常為2公尺x2公尺以上尺寸的板片,因此,會先使用攝影裝置將板片分區拍攝為多張影像,接著,再使用辨識程式對該等影像進行辨識分類。目前之辨識程式的建構方式,是先由人工列出木紋的辨識特徵,例如,胡桃木紋的色調分布狀態、特定曲線、特定形狀等,接著,分別由人工根據該等辨識特徵撰寫辨識運算式,再使用包含該等辨識運算式的辨識程式對該等影像進行辨識分類。Since the pattern usually has a large area, for example, it is usually a pattern with a size of more than 2 meters x 2 meters. Therefore, the photographic device will be used to divide the pattern into multiple images, and then the identification program will be used to identify the Image recognition and classification. The current identification program construction method is to manually list the identification features of wood grains, such as the distribution of tones, specific curves, specific shapes, etc. of walnut wood grains, and then manually write identification calculations based on these identification features. formula, and then identify and classify the images by using a recognition program including the recognition calculation formula.

然而,此種辨識方式受限於人工能列出之木紋的辨識運算式十分有限,不僅辨識精確度仍有改善空間,且難以隨著板材種類增加而快速擴充更新辨識程式。However, this identification method is limited by the limited number of wood grain identification algorithms that can be listed manually. Not only does the identification accuracy still have room for improvement, but it is also difficult to quickly expand and update the identification program as the variety of boards increases.

因此,本發明之目的,即在提供一種能解決上述問題的板片辨識分類方法。Therefore, the object of the present invention is to provide a method for identifying and classifying plates that can solve the above-mentioned problems.

於是,本發明板片辨識分類方法,適用於一運算裝置,並包含下列步驟:Therefore, the pattern identification and classification method of the present invention is applicable to a computing device, and includes the following steps:

(A)於相關於該板片的一分析影像中取複數辨識影像。(A) Taking a plurality of identification images in an analysis image related to the plate.

(B)使用一神經網路,該神經網路根據每一辨識影像輸出一特徵值組,每一特徵值組具有複數特徵值。(B) A neural network is used, and the neural network outputs a set of feature values according to each recognized image, and each set of feature values has a plurality of feature values.

(C)將該等特徵值組各自與一標準特徵值組比較,並根據比較結果判斷該板片之分類,該標準特徵值組具有複數分別對應於該等特徵值之標準特徵值。(C) comparing each of the characteristic value groups with a standard characteristic value group, and judging the classification of the plate according to the comparison result, the standard characteristic value group having a plurality of standard characteristic values respectively corresponding to the characteristic values.

因此,本發明之目的,即在提供一種能解決上述問題的板片辨識分類系統。Therefore, the object of the present invention is to provide a plate identification and classification system that can solve the above-mentioned problems.

於是,本發明板片辨識分類系統,包含一輸送裝置、一攝影裝置、一照明裝置,及一運算裝置。Therefore, the plate identification and classification system of the present invention includes a conveying device, a photographing device, a lighting device, and a computing device.

該輸送裝置用以輸送該板片。The conveying device is used for conveying the plate.

該攝影裝置對應該輸送裝置設置,用以朝該板片拍攝,並輸出複數分區影像。The photographing device is set corresponding to the conveying device for photographing the plate and outputting a plurality of partitioned images.

該照明裝置對應該攝影裝置設置,用以提供該攝影裝置拍攝該板片時之照明。The illuminating device is arranged corresponding to the photographing device, and is used for providing illumination when the photographing device photographs the plate.

該運算裝置信號連接該攝影裝置,根據該等分區影像得出該分析影像,用以執行如上述之方法的步驟。The computing device is signal-connected to the photographing device, and the analysis image is obtained according to the partitioned images to execute the steps of the above-mentioned method.

本發明之功效在於:藉由於相關於該板片的該分析影像中取該等辨識影像,再使用該神經網路運算該等辨識影像而得出該等特徵值組,接著再由該等特徵值組與該標準特徵值組比較,而據以判斷該板片之分類。不僅可以大幅提升辨識分類的精確度,也能大幅降低更新維護辨識軟體的時間及成本。The effect of the present invention is: by taking the identification images from the analysis image related to the plate, and then using the neural network to calculate the identification images to obtain the feature value groups, and then using the features The value group is compared with the standard feature value group to determine the classification of the pattern. Not only can the accuracy of identification and classification be greatly improved, but also the time and cost of updating and maintaining identification software can be greatly reduced.

參閱圖1與圖2,本發明板片辨識分類系統之一實施例,包含一輸送裝置2、一攝影裝置3、一照明裝置4,及一運算裝置5。Referring to FIG. 1 and FIG. 2 , an embodiment of the plate identification and classification system of the present invention includes a conveying device 2 , a photographing device 3 , a lighting device 4 , and a computing device 5 .

該輸送裝置2用以輸送該板片9前進。該輸送裝置2可使用履帶或是複數並列轉動的滾輪實施。The conveying device 2 is used to convey the sheet 9 forward. The conveying device 2 can be implemented using crawler belts or a plurality of rollers that rotate in parallel.

該攝影裝置3對應該輸送裝置2設置,用以朝該板片9拍攝,並輸出複數分區影像71。該攝影裝置3為可擷取影像之裝置,例如,使用CMOS彩色攝影機、CCD彩色攝影機等,其中,較佳是使用靈敏度、解析度、雜訊控制皆較佳的CCD攝影機,以獲得較佳的影像品質。其中,由於一般家具的該板片9面積較大,因此,通常無法將整張該板片9容納在一張影像之中,故會對該板片9進行分區攝影,而得到複數張可以組合為一張整體影像的分區影像71,而當該板片9面積較小時,則可以以一張分區影像71作為整體影像進行後續分析。其中,每一分區影像71之尺寸較佳是介於20公分x20公分~60公分x45公分間。The photographing device 3 is set corresponding to the conveying device 2 for photographing the plate 9 and outputting a plurality of partitioned images 71 . The imaging device 3 is a device capable of capturing images, for example, using a CMOS color camera, a CCD color camera, etc., wherein it is preferable to use a CCD camera with better sensitivity, resolution, and noise control to obtain a better image quality. image quality. Wherein, because the area of the plate 9 of general furniture is relatively large, it is usually impossible to accommodate the entire plate 9 in one image, so the plate 9 will be photographed in partitions to obtain a plurality of pictures that can be combined It is a subregional image 71 of an overall image, and when the area of the plate 9 is small, a subregional image 71 can be used as the overall image for subsequent analysis. Wherein, the size of each partition image 71 is preferably between 20 cm x 20 cm ~ 60 cm x 45 cm.

該照明裝置4對應該攝影裝置3設置,用以提供該攝影裝置3拍攝該板片9時之照明。為了可以減少色偏,提高木紋顏色的正確度,該照明裝置4較佳是選用白光之燈具,例如,選用色溫在4500K~6500K間之燈具,較佳是選用6000K左右的正白光燈具。The lighting device 4 is arranged corresponding to the photographing device 3 to provide illumination for the photographing device 3 to photograph the plate 9 . In order to reduce color shift and improve the accuracy of wood grain color, the lighting device 4 is preferably a white light fixture, for example, a light fixture with a color temperature between 4500K~6500K, preferably a pure white light fixture with a color temperature of about 6000K.

該運算裝置5信號連接該攝影裝置3,接收該等分區影像71,並根據該等分區影像71得出一分析影像7,並用以執行內存的程式指令以執行一個板片辨識分類方法,並藉由該板片辨識分類方法對該板片9進行辨識分類。其中,該運算裝置5與該攝影裝置3間可使用有線連接或無線連接(如Wi-Fi、藍牙等無線傳輸技術)傳輸該等分區影像71。該運算裝置5可使用電腦、伺服器等具有影像處理計算能力的電子裝置,例如,可使用具有圖形處理器(Graphics Processing Unit,縮寫為GPU)、神經網路處理器(Neural Network Processing Unit,縮寫為NPU)、或張量處理器(Tensor Processing Unit,縮寫為TPU)的電腦實施。The computing device 5 is signal-connected to the photographing device 3, receives the subregional images 71, and obtains an analysis image 7 based on the subregional images 71, and uses them to execute the program instructions in the internal memory to implement a method for identifying and classifying plates, and by The plate 9 is identified and classified by the plate identification and classification method. Wherein, the computing device 5 and the photographing device 3 can use a wired connection or a wireless connection (such as Wi-Fi, Bluetooth and other wireless transmission technologies) to transmit the partitioned images 71 . The computing device 5 can use electronic devices with image processing computing capabilities such as computers and servers, for example, can use graphics processing units (Graphics Processing Unit, abbreviated as GPU), neural network processors (Neural Network Processing Unit, abbreviated NPU), or tensor processing unit (Tensor Processing Unit, abbreviated as TPU) computer implementation.

參閱圖1、圖2、圖3及圖4,本發明板片辨識分類方法之一實施例運用於該運算裝置5,且適用於上述之板片辨識分類系統,該板片辨識分類方法包含以下步驟:Referring to Fig. 1, Fig. 2, Fig. 3 and Fig. 4, one embodiment of the pattern identification and classification method of the present invention is applied to the computing device 5, and is applicable to the above-mentioned pattern identification and classification system. The pattern identification and classification method includes the following step:

步驟81:該運算裝置5於相關於該板片9的該分析影像7中取複數辨識影像711。Step 81 : The computing device 5 obtains a complex identification image 711 from the analysis image 7 related to the plate 9 .

其中,該分析影像7是由複數朝該板片9拍攝的分區影像71組合而成的整體影像,該等辨識影像711較佳是分布均勻地從該分析影像7中取出奇數個影像。例如,如圖2所示,是於該分析影像7的四角各取出一張辨識影像711,並於中間的該等分區影像71中央處各取出一張辨識影像711而得出7張辨識影像711。在兼顧影像辨識精確度及運算負載的情況下,該等辨識影像711之數量較佳是取20張以下,例如可使用5、7或9張,並且,每張辨識影像711之尺寸較佳是介於8公分x8公分~12公分x12公分間,更佳是使用約10公分x10公分之尺寸。Wherein, the analysis image 7 is an overall image formed by combining a plurality of partition images 71 shot toward the plate 9 , and the identification images 711 are preferably evenly distributed and taken from the analysis image 7 in an odd number. For example, as shown in FIG. 2 , one identification image 711 is taken from each of the four corners of the analysis image 7 , and one identification image 711 is taken from the center of the partition images 71 in the middle to obtain seven identification images 711 . In the case of both image recognition accuracy and computing load, the number of these recognition images 711 is preferably less than 20, for example, 5, 7 or 9 can be used, and the size of each recognition image 711 is preferably Between 8 cm x 8 cm ~ 12 cm x 12 cm, it is better to use a size of about 10 cm x 10 cm.

步驟82:該運算裝置5使用一內存之神經網路6(Neural Network,NN),該神經網路6根據每一辨識影像711輸出一特徵值組61,每一特徵值組61具有複數特徵值611。Step 82: The computing device 5 uses a neural network 6 (Neural Network, NN) in memory, and the neural network 6 outputs a feature value group 61 according to each identification image 711, and each feature value group 61 has complex feature values 611.

其中,每一特徵值組61較佳是具有500個以上對應該板片9之特徵的特徵值611。例如,可具有500、600、1000或10000個以上的特徵值611,每一特徵值611都是對應一種木紋的一個特徵,例如,該等特徵值611可以是對應胡桃木紋的紅色調(R)分布狀態、綠色調(G)分布狀態、藍色調(B)分布狀態、線條的密度、線條的曲度分布狀態等等。由於此等特徵值611都是由該神經網路6在進行訓練過程自行擷取出的特徵向量運算所得,因此,並不需要人工一個個列表並建立對應的辨識程式。Wherein, each eigenvalue group 61 preferably has more than 500 eigenvalues 611 corresponding to the characteristics of the plate 9 . For example, there may be 500, 600, 1000 or more than 10000 feature values 611, each feature value 611 is a feature corresponding to a kind of wood grain, for example, these feature values 611 may be the red tone ( R) distribution state, green tone (G) distribution state, blue tone (B) distribution state, line density, line curvature distribution state, etc. Since these eigenvalues 611 are calculated by the eigenvectors extracted by the neural network 6 during the training process, there is no need to manually list one by one and establish a corresponding identification program.

該神經網路6可使用目前廣泛使用於影像辨識領域的卷積神經網路(Convolutional Neural Networks,縮寫為CNN)實施,並依照辨識精確度及運算時間的考量進行卷積層(convolutional layer)、線性整流層(Rectified Linear Units layer,縮寫為ReLU layer)、池化層(pooling layer)的數量建置,及設定每一卷積層中的卷積核(Kernel)之尺寸。The neural network 6 can be implemented using Convolutional Neural Networks (CNN for short), which are currently widely used in the field of image recognition, and the convolutional layer (convolutional layer), linear The rectification layer (rectified linear units layer, abbreviated as ReLU layer), the number of pooling layers is established, and the size of the convolution kernel (Kernel) in each convolution layer is set.

步驟83:將該等特徵值組61各自與一標準特徵值組62比較,並根據比較結果判斷該板片9之分類,該標準特徵值組62具有複數分別對應於該等特徵值611之標準特徵值621。該標準特徵值組62所具有之該等標準特徵值621的數量相同於每一特徵值組61所具有的該等特徵值611的數量。Step 83: compare these feature value groups 61 with a standard feature value group 62 respectively, and judge the classification of the plate 9 according to the comparison result, the standard feature value group 62 has a plurality of standards corresponding to the feature values 611 respectively Eigenvalue 621. The number of the standard feature values 621 in the standard feature value group 62 is the same as the number of the feature values 611 in each feature value group 61 .

其中,可使用歐氏距離(或稱歐幾里得距離)或餘弦距離(或稱餘弦相似度)運算每一特徵值組61與該標準特徵值組62之差異值作為比較,並於多數特徵值組61與該標準特徵值組62之差異值皆小於一標準預定值時,判斷該板片9為該標準特徵值組62所對應之木紋。例如,假設該神經網路6根據7張辨識影像711輸出了7組特徵值組61,每一特徵值組61具有1000個特徵值611,運算每一特徵值組61的1000個特徵值611與該標準特徵值組62的1000個標準特徵值621的歐氏距離,當所運算出的歐氏距離小於該標準預定值時,則判斷該組特徵值組61所對應的該辨識影像711屬於該標準特徵值組62所對應的木紋,若大於該標準預定值時,則判斷該組特徵值組61所對應的該辨識影像711不屬於該標準特徵值組62所對應的木紋,並使用多數決(voting)方式決定最終判定結果。即,以比較基準為一種木紋的情況下,當7張辨識影像711中超過半數判斷為小於該標準預定值時,最終判定結果為符合該種木紋。若比較基準為多種木紋的情況下,假設7張辨識影像711中,3張辨識影像711判斷為胡桃木、2張辨識影像711判斷為樺木、2張辨識影像711判斷為櫻桃木,則最終判定結果為最多數的胡桃木。Wherein, Euclidean distance (or called Euclidean distance) or cosine distance (or cosine similarity) can be used to calculate the difference value between each feature value group 61 and the standard feature value group 62 as a comparison, and in most features When the difference values between the value group 61 and the standard characteristic value group 62 are both smaller than a standard predetermined value, it is judged that the plate 9 is the wood grain corresponding to the standard characteristic value group 62 . For example, assuming that the neural network 6 outputs 7 sets of feature value groups 61 according to 7 identification images 711, and each feature value group 61 has 1000 feature values 611, the calculation of the 1000 feature values 611 of each feature value group 61 and The Euclidean distance of the 1000 standard eigenvalues 621 of the standard eigenvalue group 62, when the calculated Euclidean distance is less than the standard predetermined value, it is judged that the identification image 711 corresponding to the group of eigenvalues 61 belongs to the If the wood grain corresponding to the standard feature value group 62 is greater than the standard predetermined value, then it is judged that the identification image 711 corresponding to the feature value group 61 does not belong to the wood grain corresponding to the standard feature value group 62, and use Majority voting (voting) method determines the final judgment result. That is, when a kind of woodgrain is used as the comparison reference, when more than half of the 7 recognized images 711 are judged to be smaller than the predetermined standard value, the final judgment result is that the kind of woodgrain is met. If the comparison standard is multiple wood grains, assuming that among the 7 recognition images 711, 3 recognition images 711 are judged to be walnut, 2 recognition images 711 are judged to be birch, and 2 recognition images 711 are judged to be cherry wood, then finally Judgment result is most walnut.

參閱圖1、圖2、圖4及圖5,該板片辨識分類方法較佳是還包含下列用以訓練(training)該神經網路6之步驟:Referring to Fig. 1, Fig. 2, Fig. 4 and Fig. 5, the method for identifying and classifying plates preferably also includes the following steps for training (training) the neural network 6:

步驟84:該運算裝置5接收複數朝該板片9拍攝的分區影像71,於每一分區影像71中取複數訓練影像。Step 84: The computing device 5 receives a plurality of subregional images 71 shot toward the plate 9, and obtains a plurality of training images from each subregional image 71.

其中,於訓練過程中,為了提升該神經網路6之運算精確度,較佳是輸入較多數量的該等訓練影像進行訓練,例如,可根據該分區影像71的大小擷取該等訓練影像,當該分區影像71較大時,則擷取較多的訓練影像,其數量根據該分區影像71的大小而約在30~10000間調整。其選取該等訓練影像的原則為,於每一分區影像71中設置複數目標偵測點,且於每一目標偵測點重複擷取20~50張位置不同(即,位置會上下左右具有位移)的該等訓練影像,每一訓練影像之重複區域以不大於70%為佳。所述目標偵測點可以是每一個像素(pixel),或是為預先設定位置的複數偵測點。Wherein, in the training process, in order to improve the calculation accuracy of the neural network 6, it is preferable to input a larger number of these training images for training, for example, these training images can be extracted according to the size of the partition image 71 , when the subregional image 71 is larger, more training images are captured, the number of which is adjusted between 30 and 10000 according to the size of the subregional image 71 . The principle of selecting these training images is to set a plurality of target detection points in each subregion image 71, and repeatedly capture 20-50 different positions at each target detection point (that is, the positions will have displacements up, down, left, and right. ) of the training images, the repetition area of each training image is preferably no more than 70%. The target detection point can be each pixel, or a plurality of detection points with preset positions.

並且,該等分區影像71較佳是包括由不同角度、或不同照度、或不同距離拍攝之該板片9的影像資訊,或是依需求選擇包含上述數種情況組合的影像資訊,以供訓練該神經網路6在各種不同狀況下皆能正確判斷木紋。其中,所指不同角度是將該板片9水平旋轉0度、90度、180度、270度後進行拍攝;所指不同照度,是使用出廠檢測時的平均照度值、±5%的平均照度值、±10%的平均照度值對該板片9進行拍攝;所指不同距離,是使用出廠檢測時該攝影裝置3對該板片9拍攝時的平均距離、±5%的平均距離、±10%的平均距離對該板片9進行拍攝,如此,可以藉由不同拍攝距離而得到不同縮小比例的影像資訊。In addition, the subregional images 71 preferably include image information of the plate 9 taken from different angles, or different illuminance, or different distances, or select image information including a combination of the above-mentioned situations according to requirements, for training The neural network 6 can correctly judge wood grain under various conditions. Among them, the different angles referred to are to take pictures after rotating the plate 9 horizontally at 0 degrees, 90 degrees, 180 degrees, and 270 degrees; the different illuminances referred to are the average illuminance value during factory inspection, and the average illuminance of ±5%. value, the average illuminance value of ±10% to photograph the plate 9; the different distances referred to are the average distance when the photographic device 3 is used to photograph the plate 9 when the ex-factory inspection is used, the average distance of ±5%, the average distance of ±5%. The plate 9 is photographed at an average distance of 10%. In this way, image information of different reduction ratios can be obtained through different photographing distances.

每一該訓練影像之尺寸相同於該辨識影像711的尺寸,較佳是介於8公分x8公分~12公分x12公分間,更佳是使用約10公分x10公分之尺寸。The size of each training image is the same as that of the recognition image 711 , preferably between 8 cm x 8 cm ~ 12 cm x 12 cm, more preferably about 10 cm x 10 cm.

步驟85:該神經網路6根據每一訓練影像輸出對應之該特徵值組61。Step 85: The neural network 6 outputs the corresponding feature value set 61 according to each training image.

相同於上述,每一特徵值組61具有500個以上對應該板片9之特徵的特徵值611,每一特徵值611都是對應一種木紋的一個特徵。此等特徵值611都是會於該神經網路6在進行訓練過程自行擷取出的特徵向量運算所得。Same as above, each eigenvalue group 61 has more than 500 eigenvalues 611 corresponding to the characteristics of the plate 9, and each eigenvalue 611 is a characteristic corresponding to a kind of wood grain. These eigenvalues 611 are obtained through operation on the eigenvectors extracted by the neural network 6 during the training process.

步驟86:調整該神經網路6之參數,使該神經網路6根據該等訓練影像所輸出的該等特徵值組61間之損失降低。Step 86: Adjust the parameters of the neural network 6 to reduce the loss between the feature value groups 61 output by the neural network 6 according to the training images.

其中,可使用對比損失方法(Contrastive loss)調整該神經網路6之參數,使相同木紋間之該等特徵值組61的距離變小,不同木紋間的該等特徵值組61的距離變大(需先準備不同木紋的訓練影像一併進行訓練),或使用三元組損失方法(triplet loss)、改進三元組損失方法(Improved triplet loss)調整該神經網路6之參數,使相同木紋間之該等特徵值組61的距離變小,不同木紋間的該等特徵值組61的距離變大(需先準備不同木紋的訓練影像一併進行訓練)。於相同木紋間之該等特徵值組61的距離小於一設定的預定調整值時,即表示該神經網路6已達到可接受的辨識精確度。該預定調整值可依實際所需的精確度而進行調整。Among them, the parameters of the neural network 6 can be adjusted by using the contrastive loss method (Contrastive loss), so that the distance between the feature value groups 61 between the same wood grains becomes smaller, and the distance between the feature value groups 61 between different wood grains become larger (training images with different wood grains need to be prepared for training together), or use the triplet loss method (triplet loss) or the improved triplet loss method (Improved triplet loss) to adjust the parameters of the neural network 6, Make the distance between the feature value groups 61 between the same wood grains smaller, and the distance between the feature value groups 61 between different wood grains become larger (training images with different wood grains need to be prepared and trained together). When the distance between the feature value groups 61 between the same wood grains is less than a predetermined adjustment value, it means that the neural network 6 has reached an acceptable recognition accuracy. The predetermined adjustment value can be adjusted according to the actual required accuracy.

步驟87:根據對應該等訓練影像的該等特徵值組61得出該標準特徵值組62。Step 87: Obtain the standard feature value set 62 according to the feature value sets 61 corresponding to the training images.

其中,將對應該等訓練影像的該等特徵值組61取平均值而作為該標準特徵值組62。即,將對應相同木紋的該等特徵值組61取平均值而作為該標準特徵值組62。如此,在使用各種不同木紋的大量訓練影像對該神經網路6進行訓練後,將會得到分別對應各種木紋的複數標準特徵值組62,以供步驟81~83中進行木紋的辨識分類。Wherein, the average value of the feature value groups 61 corresponding to the training images is taken as the standard feature value group 62 . That is, the average value of the feature value groups 61 corresponding to the same wood grain is taken as the standard feature value group 62 . In this way, after using a large number of training images of various wood grains to train the neural network 6, a complex set of standard feature values 62 corresponding to various wood grains will be obtained for wood grain identification in steps 81-83. Classification.

經由以上的說明,本實施例的功效如下:Through the above description, the effect of this embodiment is as follows:

一、藉由於相關於該板片9的該分析影像7中取該等辨識影像711,再使用該神經網路6運算該等辨識影像711而得出該等特徵值組61,接著再由該等特徵值組61與該標準特徵值組62比較,而據以判斷該板片9之分類。不僅可以藉由該神經網路6能在訓練過程自行擷取出該等特徵值611的特性,而建構出人力所無法企及的大量特徵值611,進而大幅提升辨識分類的精確度,並且,當產線上所需辨識的板材種類增加時,也僅需再次訓練該神經網路6即可使用,而不需再使用人工重新建構擴充新的辨識程式,因此,也能大幅降低更新維護辨識軟體的時間及成本。1. By taking the identification images 711 from the analysis image 7 related to the plate 9, and then using the neural network 6 to calculate the identification images 711 to obtain the feature value groups 61, and then by the The equal characteristic value group 61 is compared with the standard characteristic value group 62, and the classification of the plate 9 is judged accordingly. Not only can the neural network 6 be able to extract the characteristics of these eigenvalues 611 during the training process, but also construct a large number of eigenvalues 611 that cannot be achieved by manpower, thereby greatly improving the accuracy of identification and classification, and, when the product When the types of boards to be identified online increase, it is only necessary to retrain the neural network 6 to use it, without having to use manual reconstruction and expansion of new identification programs. Therefore, the time for updating and maintaining identification software can also be greatly reduced and cost.

進一步說明,以技術上而言,當使用例如對比損失方法(Contrastive loss)、三元組損失方法(triplet loss)、改進三元組損失方法(Improved triplet loss)進行訓練後,所得的該神經網路6針對不同木紋所輸出的該等特徵值組61即會具有一定的差異,因此,並不需要每增加一種板材種類即重新訓練該神經網路6,可使用原本之該神經網路6針對新的板材種類運算出數組特徵值組61,並取平均值以得出新的該標準特徵值組62後,即可在不重新訓練該神經網路6的情況下,使用原本的該神經網路6對新的板材種類進行辨識。但亦可每增加一或數種板材種類即重新訓練該神經網路6,如此,可以達到更高的辨識精確度。其中,若是新增的板材之木紋與原有的板材木紋相似度較高時,則建議重新訓練該神經網路6,以達到較佳的辨識精確度。To further illustrate, technically speaking, after training using, for example, the contrastive loss method (Contrastive loss), the triplet loss method (triplet loss), and the improved triplet loss method (Improved triplet loss), the resulting neural network The eigenvalue groups 61 output by road 6 for different wood grains will have certain differences. Therefore, it is not necessary to retrain the neural network 6 every time a board type is added, and the original neural network 6 can be used for After calculating the array eigenvalue group 61 for the new plate type and taking the average value to obtain the new standard eigenvalue group 62, the original neural network can be used without retraining the neural network 6 Lu 6 identifies new board types. However, the neural network 6 can also be retrained every time one or several board types are added, so that higher identification accuracy can be achieved. Wherein, if the wood grain of the newly added board has a high similarity with the original wood grain, it is recommended to retrain the neural network 6 to achieve better recognition accuracy.

二、藉由將朝該板片9拍攝的該等分區影像71組合為該分析影像7後,再由整體影像的該分析影像7中取該等辨識影像711,可以減少因為只考量單一局部的該分區影像71而造成的誤差。2. By combining the subregional images 71 taken toward the plate 9 into the analysis image 7, and then extracting the identification images 711 from the analysis image 7 of the overall image, it is possible to reduce the problem of only considering a single part The error caused by the partition image 71.

三、藉由使用包括不同角度、或不同照度、或不同距離拍攝之該板片9的影像資訊進行訓練,可以提升該神經網路6在各種不同的變化下的辨識精度,避免當產線上的環境稍有變化時該神經網路6即會產生誤判的情況。3. By using the image information of the plate 9 taken from different angles, or different illuminances, or different distances for training, the recognition accuracy of the neural network 6 under various changes can be improved, and it is avoided when the production line When the environment changes slightly, the neural network 6 will produce misjudgment.

綜上所述,本發明板片辨識分類方法及系統,故確實能達成本發明的目的。To sum up, the plate recognition and classification method and system of the present invention can indeed achieve the purpose of the present invention.

惟以上所述者,僅為本發明之實施例而已,當不能以此限定本發明實施之範圍,凡是依本發明申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本發明專利涵蓋之範圍內。But what is described above is only an embodiment of the present invention, and should not limit the scope of the present invention. All simple equivalent changes and modifications made according to the patent scope of the present invention and the content of the patent specification are still within the scope of the present invention. Within the scope covered by the patent of the present invention.

2:輸送裝置 3:攝影裝置 4:照明裝置 5:運算裝置 6:神經網路 61:特徵值組 611:特徵值 62:標準特徵值組 621:標準特徵值 7:分析影像 71:分區影像 711:辨識影像 81~87:步驟 9:板片 2: Conveyor 3: Photographic device 4: Lighting device 5: Computing device 6: Neural Network 61:Eigenvalue group 611:Eigenvalue 62:Standard eigenvalue group 621:Standard eigenvalues 7: Analyzing images 71: Partition image 711: Recognition image 81~87: Steps 9: Plate

本發明之其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中: 圖1是本發明板片辨識分類系統的一實施例的一示意圖; 圖2是一示意圖,說明該實施例的一分析影像、複數分區影像及複數辨識影像; 圖3是本發明板片辨識分類方法的一實施例的一流程圖; 圖4是該實施例的運作示意圖;及 圖5是該實施例訓練一神經網路的一流程圖。 Other features and effects of the present invention will be clearly presented in the implementation manner with reference to the drawings, wherein: Fig. 1 is a schematic diagram of an embodiment of the plate identification and classification system of the present invention; Fig. 2 is a schematic diagram illustrating an analysis image, multiple partition images and multiple identification images of the embodiment; Fig. 3 is a flowchart of an embodiment of the plate identification and classification method of the present invention; Figure 4 is a schematic diagram of the operation of the embodiment; and FIG. 5 is a flowchart of training a neural network in this embodiment.

6:神經網路 61:特徵值組 611:特徵值 62:標準特徵值組 621:標準特徵值 711:辨識影像 6: Neural Network 61:Eigenvalue group 611:Eigenvalue 62:Standard eigenvalue group 621:Standard eigenvalues 711: Recognition image

Claims (9)

一種板片辨識分類方法,適用於一運算裝置,並包含下列步驟:(A)於相關於該板片的一分析影像中取複數辨識影像,該分析影像是由複數朝該板片拍攝的分區影像組合而成,每一該分區影像之尺寸介於20公分x20公分~60公分x45公分間,且每一該辨識影像之尺寸介於8公分x8公分~12公分x12公分間;(B)使用一神經網路,該神經網路根據每一辨識影像輸出一特徵值組,每一特徵值組具有複數特徵值;及(C)將該等特徵值組各自與至少一標準特徵值組比較,並根據比較結果判斷該板片之分類,該至少一標準特徵值組具有複數分別對應於該等特徵值之標準特徵值。 A method for identifying and classifying a plate, which is applicable to a computing device, and includes the following steps: (A) taking a plurality of identification images from an analysis image related to the plate, and the analysis image is a plurality of partitions taken towards the plate Combining images, the size of each subregion image is between 20 cm x 20 cm ~ 60 cm x 45 cm, and the size of each identification image is between 8 cm x 8 cm ~ 12 cm x 12 cm; (B) use a neural network that outputs a feature value set based on each identified image, each feature value set having a plurality of feature values; and (C) comparing each of the feature value sets with at least one standard feature value set, And judging the classification of the plate according to the comparison result, the at least one standard feature value group has a plurality of standard feature values corresponding to the feature values respectively. 如請求項1所述的板片辨識分類方法,其中,於步驟(A)中,於該分析影像中取N個辨識影像,N為奇數且小於20。 The pattern recognition and classification method as described in Claim 1, wherein, in step (A), N recognition images are taken from the analysis image, and N is an odd number and less than 20. 如請求項1所述的板片辨識分類方法,其中,於步驟(B)中,每一特徵值組具有500個以上對應該板片之特徵的特徵值。 The pattern identification and classification method according to claim 1, wherein, in step (B), each feature value group has more than 500 feature values corresponding to the features of the pattern. 如請求項1所述的板片辨識分類方法,其中,於步驟(C)中,使用歐氏距離或餘弦距離運算每一特徵值組與該至少一標準特徵值組之差異值,並於多數特徵值組與該至少一標準特徵值組之差異值皆小於一標準預定值時,判 斷該板片為該至少一標準特徵值組所對應之紋路。 The plate identification and classification method as described in claim 1, wherein, in step (C), the difference value between each eigenvalue group and the at least one standard eigenvalue group is calculated using Euclidean distance or cosine distance, and in most When the difference values between the eigenvalue group and the at least one standard eigenvalue group are less than a standard predetermined value, the judgment Determining the plate is the texture corresponding to the at least one standard feature value group. 如請求項1所述的板片辨識分類方法,還包含下列用以訓練該神經網路之步驟:(D)接收複數朝該板片拍攝的分區影像,於每一分區影像中取複數訓練影像;(E)該神經網路根據每一訓練影像輸出對應之該特徵值組;(F)調整該神經網路之參數,使該神經網路根據該等訓練影像所輸出的該等特徵值組間之損失降低;及(G)根據對應該等訓練影像的該等特徵值組得出該至少一標準特徵值組。 The plate identification and classification method as described in claim 1, further comprising the following steps for training the neural network: (D) receiving a plurality of partitioned images taken towards the plate, and taking a plurality of training images in each partitioned image ; (E) the neural network outputs the corresponding set of feature values according to each training image; (F) adjusts the parameters of the neural network so that the neural network outputs the set of feature values according to the training images and (G) deriving the at least one standard feature value set according to the feature value sets corresponding to the training images. 如請求項5所述的板片辨識分類方法,其中,於步驟(D)中,該等分區影像包括由不同角度、或不同照度、或不同距離拍攝之該板片的影像資訊。 The method for identifying and classifying plates as described in Claim 5, wherein, in step (D), the partition images include image information of the plates taken from different angles, or different illuminances, or different distances. 如請求項5所述的板片辨識分類方法,其中,於步驟(F)中,使用對比損失方法或三元組損失方法調整該神經網路之參數。 The pattern recognition and classification method according to Claim 5, wherein in step (F), the parameters of the neural network are adjusted using a contrastive loss method or a triplet loss method. 一種板片辨識分類方法,適用於一運算裝置,並包含下列步驟:(A)於相關於該板片的一分析影像中取複數辨識影像;(B)使用一神經網路,該神經網路根據每一辨識影像輸出一特徵值組,每一特徵值組具有複數特徵值;及(C)將該等特徵值組各自與至少一標準特徵值組比 較,並根據比較結果判斷該板片之分類,該至少一標準特徵值組具有複數分別對應於該等特徵值之標準特徵值;該板片辨識分類方法還包含下列用以訓練該神經網路之步驟:(D)接收複數朝該板片拍攝的分區影像,於每一分區影像中取複數訓練影像,其中,於每一分區影像中設置複數目標偵測點,且於每一目標偵測點擷取20~50張位置不同的該等訓練影像,每一訓練影像之重複區域不大於70%;(E)該神經網路根據每一訓練影像輸出對應之該特徵值組;(F)調整該神經網路之參數,使該神經網路根據該等訓練影像所輸出的該等特徵值組間之損失降低;及(G)根據對應該等訓練影像的該等特徵值組得出該至少一標準特徵值組。 A pattern recognition and classification method is applicable to a computing device, and includes the following steps: (A) extracting plural recognition images from an analysis image related to the pattern; (B) using a neural network, the neural network Outputting a set of feature values according to each identified image, each set of feature values having a plurality of feature values; and (C) comparing each set of feature values with at least one set of standard feature values Compare, and judge the classification of the plate according to the comparison result, the at least one standard feature value group has a plurality of standard feature values corresponding to the feature values respectively; the plate identification and classification method also includes the following for training the neural network Steps of: (D) receiving a plurality of subregional images taken towards the plate, and taking multiple training images in each subregional image, wherein a plurality of target detection points are set in each subregional image, and each target detection Pick up 20-50 training images with different positions, and the repetition area of each training image is not more than 70%; (E) the neural network outputs the corresponding feature value group according to each training image; (F) adjusting the parameters of the neural network so that the loss between the feature value groups output by the neural network according to the training images is reduced; and (G) obtaining the at least one standard eigenvalue set. 一種板片辨識分類系統,包含:一輸送裝置,用以輸送該板片;一攝影裝置,對應該輸送裝置設置,用以朝該板片拍攝,並輸出複數分區影像;一照明裝置,對應該攝影裝置設置,用以提供該攝影裝置拍攝該板片時之照明;及一運算裝置,信號連接該攝影裝置,根據該等分區影像得出一分析影像,用以執行如請求項1至8中任一項所 述之方法的步驟。 A plate identification and classification system, comprising: a conveying device, used to transport the plate; a photographing device, installed corresponding to the conveying device, to shoot towards the plate, and output a plurality of partition images; a lighting device, corresponding to the The photographing device is set up to provide illumination when the photographing device photographs the plate; and a computing device is connected to the photographing device to obtain an analysis image based on the images of the subregions, and is used to execute requirements 1 to 8 Any one steps of the method described.
TW110107027A 2021-02-26 2021-02-26 Pattern identification and classification method and system TWI786555B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW110107027A TWI786555B (en) 2021-02-26 2021-02-26 Pattern identification and classification method and system
CN202110520095.XA CN114998635A (en) 2021-02-26 2021-05-13 Plate identification and classification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110107027A TWI786555B (en) 2021-02-26 2021-02-26 Pattern identification and classification method and system

Publications (2)

Publication Number Publication Date
TW202234290A TW202234290A (en) 2022-09-01
TWI786555B true TWI786555B (en) 2022-12-11

Family

ID=83018141

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110107027A TWI786555B (en) 2021-02-26 2021-02-26 Pattern identification and classification method and system

Country Status (2)

Country Link
CN (1) CN114998635A (en)
TW (1) TWI786555B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027482A1 (en) * 2003-06-02 2005-02-03 Mokhtar Benaoudia Method for estimating the quality of wood chips
TW200842342A (en) * 2007-04-27 2008-11-01 Meinan Machinery Works Method, device, and program of inspecting wood
CN102663422A (en) * 2012-03-27 2012-09-12 江南大学 Floor layer classification method based on color characteristic
CN107967491A (en) * 2017-12-14 2018-04-27 北京木业邦科技有限公司 Machine learning method, device, electronic equipment and the storage medium again of plank identification
CN108197662A (en) * 2018-01-22 2018-06-22 湖州师范学院 A kind of solid wooden floor board sorting technique

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027482A1 (en) * 2003-06-02 2005-02-03 Mokhtar Benaoudia Method for estimating the quality of wood chips
TW200842342A (en) * 2007-04-27 2008-11-01 Meinan Machinery Works Method, device, and program of inspecting wood
CN102663422A (en) * 2012-03-27 2012-09-12 江南大学 Floor layer classification method based on color characteristic
CN107967491A (en) * 2017-12-14 2018-04-27 北京木业邦科技有限公司 Machine learning method, device, electronic equipment and the storage medium again of plank identification
CN108197662A (en) * 2018-01-22 2018-06-22 湖州师范学院 A kind of solid wooden floor board sorting technique

Also Published As

Publication number Publication date
CN114998635A (en) 2022-09-02
TW202234290A (en) 2022-09-01

Similar Documents

Publication Publication Date Title
TWI383142B (en) Wood section of the probe method and device and computer can read the recording media
TW202001798A (en) Optical inspection method, optical inspection device and optical inspection system
CN102184878B (en) System and method for feeding back image quality of template for wafer alignment
CN110400278B (en) Full-automatic correction method, device and equipment for image color and geometric distortion
CN111815564B (en) Method and device for detecting silk ingots and silk ingot sorting system
CN113383227A (en) Defect inspection device
CN111709980A (en) Multi-scale image registration method and device based on deep learning
JP2007147442A (en) Method, device, and program for inspecting wood
JP2008004123A (en) Specific shape region extraction device and method, specific region extraction device and method, and copy condition decision device and method
TW202201283A (en) Training data increment method, electronic apparatus and computer-readable medium
TW202125330A (en) Method and device for determining whether object has defect
JP2023021359A (en) Press component inspection device and press component inspection method
Okarma et al. Color independent quality assessment of 3D printed surfaces based on image entropy
TWI786555B (en) Pattern identification and classification method and system
CN114782421A (en) Poultry veterinarian auxiliary system based on egg laying abnormality detection
US11683594B2 (en) Systems and methods for camera exposure control
US20150304627A1 (en) Method and arrangement for estimating at least one cross-channel colour mapping model from an set of tuples of corresponding colours relative to at least two images
Fastowicz et al. Fast quality assessment of 3D printed surfaces based on structural similarity of image regions
WO2020107646A1 (en) Image processing method
US8724888B2 (en) Stereo vision based dice recognition system and stereo vision based dice recognition method for uncontrolled environments
US11195265B2 (en) Server and method for recognizing image using deep learning
CN115272340B (en) Industrial product defect detection method and device
TW202234344A (en) Plate image recognition method and system capable of improving image recognition accuracy
TWI766237B (en) Object at sea distance measuring system
Li et al. High quality color calibration for multi-camera systems with an omnidirectional color checker