TWI880479B - Automated classification system and method for scalp sebum properties - Google Patents
Automated classification system and method for scalp sebum properties Download PDFInfo
- Publication number
- TWI880479B TWI880479B TW112145307A TW112145307A TWI880479B TW I880479 B TWI880479 B TW I880479B TW 112145307 A TW112145307 A TW 112145307A TW 112145307 A TW112145307 A TW 112145307A TW I880479 B TWI880479 B TW I880479B
- Authority
- TW
- Taiwan
- Prior art keywords
- scalp
- sebum
- module
- dimensional vector
- vector
- Prior art date
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
本發明主要涉及電腦視覺和機器學習領域。更具體地說,該發明涉及使用視覺變換模型自動分類頭皮皮脂特性的系統和方法。 The present invention relates generally to the fields of computer vision and machine learning. More specifically, the invention relates to a system and method for automatically classifying scalp sebum properties using a visual transformation model.
傳統的頭皮皮脂特性判定方法,如乾性、中性或油性,通常依賴於手動檢查和評估。這些方法不僅耗時,而且由於主觀判斷,容易出現人為錯誤和變異性。此外,評估者的心理狀態或專業知識可能影響手動方法,導致結果不一致。 Traditional methods for determining scalp sebum characteristics, such as dry, normal, or oily, usually rely on manual inspection and assessment. These methods are not only time-consuming, but also prone to human error and variability due to subjective judgment. In addition, the assessor's psychological state or professional knowledge may affect the manual method, resulting in inconsistent results.
一些現有的電腦視覺技術已被用來自動化此過程。然而,這些方法經常難以處理對於準確分類皮脂而言至關重要的微妙特徵差異。此外,這些方法中用於訓練和驗證的數據經常受到類別不平衡的困擾,需要數據增強技術來提高模型性能。 Some existing computer vision techniques have been used to automate this process. However, these methods often have difficulty handling subtle feature differences that are critical for accurately classifying sebum. In addition, the data used for training and validation in these methods often suffer from class imbalance, requiring data augmentation techniques to improve model performance.
此外,對於使用高解析度頭皮圖像,特別是當這些圖像被存儲或傳輸進行分析時,已經提出了隱私問題。 Additionally, privacy concerns have been raised regarding the use of high-resolution scalp images, particularly when these images are stored or transmitted for analysis.
因此,需要一種更可靠、高效且保護隱私的自動分類頭皮皮脂特性的方法。該方法應能處理數據中的微妙特徵差異和類別不平衡,同時確保被分析的頭皮圖像的個人隱私。 Therefore, a more reliable, efficient, and privacy-preserving method for automatically classifying scalp sebum characteristics is needed. The method should be able to handle subtle feature differences and class imbalance in the data while ensuring the privacy of the individual scalp images being analyzed.
本發明提出了一種使用視覺變換模型自動分類頭皮皮脂特性的系統和方法。此發明的目標是克服現有方法的限制,提供一種既有效又可靠的解決方案。傳統方法通常依賴於手動檢查,這不僅耗時,而且容易出現人為錯誤和主觀性。本發明自動化了此過程,從而消除了這些問題。 The present invention proposes a system and method for automatically classifying scalp sebum properties using a visual transformation model. The goal of this invention is to overcome the limitations of existing methods and provide a solution that is both effective and reliable. Traditional methods often rely on manual inspection, which is not only time-consuming but also prone to human error and subjectivity. The present invention automates this process, thereby eliminating these problems.
該系統捕捉頭皮部分的高解析度影像,然後將這些影像劃分為不重疊的區塊。每個區塊都被轉換為一維向量。學習性的位置嵌入被添加到這些向量中,以保留在壓平過程中丟失的空間資訊。然後將這些增強的向量輸入到視覺變換模型中,該模型處理數據並輸出一個表示頭皮皮脂特性的分類標籤,如乾性、中性或油性。 The system captures high-resolution images of sections of the scalp, which are then segmented into non-overlapping blocks. Each block is converted to a one-dimensional vector. Learned positional embeddings are added to these vectors to preserve spatial information lost during the flattening process. These enhanced vectors are then fed into a visual transformation model, which processes the data and outputs a classification label representing the sebum properties of the scalp, such as dry, normal, or oily.
本發明的一個獨特之處是可選的數據增強模組,該模組對區塊進行隨機旋轉和位置交換。這不僅增強了模型的性能,解決了類別不平衡問題,而且增加了一層隱私保護。 A unique feature of this invention is the optional data augmentation module that randomly rotates and swaps the blocks. This not only improves the performance of the model and solves the class imbalance problem, but also adds a layer of privacy protection.
通過自動化頭皮皮脂特性的分類並結合先進的機器學習技術,本發明為現有方法面臨的挑戰提供了全面且有效的解決方案。它有效地處理微妙的特徵差異,解決訓練數據中的類別不平衡,並確保被分析的頭皮圖像的個人隱私。 By automating the classification of scalp sebum characteristics and combining advanced machine learning techniques, this invention provides a comprehensive and effective solution to the challenges faced by existing methods. It effectively handles subtle feature differences, resolves class imbalance in training data, and ensures the privacy of the analyzed scalp images.
為讓本之上述特徵和優點能更明顯易懂,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下。 In order to make the above features and advantages of the present invention more clearly understood, the following is a detailed description of the preferred embodiment with the accompanying drawings.
100:頭皮皮脂特性自動分類系統 100: Automatic classification system for scalp sebum characteristics
110:成像裝置 110: Imaging device
120:區塊提取模組 120: Block extraction module
130:數據增強模組 130:Data enhancement module
140:向量轉換模組 140: Vector conversion module
150:位置嵌入模組 150: Location embedding module
152:特徵提取模組 152: Feature extraction module
152A:第一全連接層 152A: First fully connected layer
152B:第二全連接層 152B: Second fully connected layer
154:激活函數模組 154: Activate function module
154A:GELU激活函數 154A:GELU activation function
156:標準化模組 156: Standardization module
156A:Sigmoid激活函數 156A: Sigmoid activation function
160:視覺變換模型 160: Visual transformation model
162:自我注意機制 162:Self-attention mechanism
164:前向神經網絡 164: Forward Neural Network
166:皮脂分類標籤 166: Sebum classification label
S110~S170:流程圖步驟 S110~S170: Flowchart steps
S210~S230:流程圖步驟 S210~S230: Flowchart steps
下文將根據附圖來描述各種實施例,所述附圖是用來說明而不是用以任何方式來限制範圍,其中相似的標號表示相似的元件,並且其中: Various embodiments will be described below with reference to the accompanying drawings, which are intended to illustrate and not to limit the scope in any way, in which like reference numerals represent like elements, and in which:
圖1所繪示為本發明之頭皮皮脂特性自動分類系統的其中一實施例的方塊圖。 FIG1 is a block diagram showing one embodiment of the automatic classification system of scalp sebum characteristics of the present invention.
圖2所繪示為本發明之頭皮皮脂特性自動分類方法的其中一實施例的流程圖。 FIG2 shows a flow chart of one embodiment of the automatic classification method of scalp sebum characteristics of the present invention.
圖3A至圖3C所繪示為本發明中將影像轉換為區塊的過程之示意圖。 Figures 3A to 3C are schematic diagrams showing the process of converting an image into blocks in the present invention.
圖4所繪示為本發明之添加位置資訊到一維向量的過程的流程圖。 FIG4 is a flowchart showing the process of adding position information to a one-dimensional vector according to the present invention.
圖5A所繪示為本發明之位置嵌入模組的架構圖。 FIG5A shows the structure diagram of the location embedding module of the present invention.
圖5B所繪示為本發明之位置嵌入模組的其中一實施例。 FIG. 5B shows one embodiment of the position embedding module of the present invention.
圖6所繪示為本發明之視覺變換模型的示意圖。 FIG6 is a schematic diagram of the visual transformation model of the present invention.
參照本文闡述的詳細內容和附圖說明是最好理解本發明。下面參照附圖會討論各種實施例。然而,本領域技術人員將容易理解,這裡關於附圖給出的詳細描述僅僅是為了解釋的目的,因為這些方法和系統可超出所描述的實施例。例如,所給出的教導和特定應用的需求可能產生多種可選的和合適的方法來實現在此描述的任何細節的功能。因此,任何方法可延伸超出所描述和示出的以下實施例中的特定實施選擇範圍。 The present invention is best understood with reference to the detailed description and accompanying drawings set forth herein. Various embodiments will be discussed below with reference to the accompanying drawings. However, those skilled in the art will readily appreciate that the detailed description given herein with respect to the accompanying drawings is for illustrative purposes only, as the methods and systems may extend beyond the described embodiments. For example, the teachings given and the requirements of a particular application may yield a variety of optional and suitable methods to implement the functionality of any detail described herein. Therefore, any method may extend beyond the specific implementation options described and shown in the following embodiments.
請參照圖1與圖2,圖1所繪示為本發明之頭皮皮脂特性自動分類系統的其中一實施例的方塊圖,圖2所繪示為本發明之頭皮皮脂特性自動分類方法的其中一實施例的流程圖。請參照步驟S110,本實施例揭示的頭皮皮脂特性自動分類系統100首先捕捉頭皮部分的高解析度影像,此過程可以使用各種能夠捕捉頭皮表面詳細影像的成像裝置110進行。捕捉的頭皮影像作為頭皮皮脂特性自動分類系統100的主要輸入,提供了用於確定皮脂特性的原始數據。 Please refer to FIG. 1 and FIG. 2. FIG. 1 is a block diagram of one embodiment of the automatic classification system for scalp sebum characteristics of the present invention, and FIG. 2 is a flow chart of one embodiment of the automatic classification method for scalp sebum characteristics of the present invention. Please refer to step S110. The automatic classification system for scalp sebum characteristics 100 disclosed in this embodiment first captures a high-resolution image of the scalp part. This process can be performed using various imaging devices 110 that can capture detailed images of the scalp surface. The captured scalp image serves as the main input of the automatic classification system for scalp sebum characteristics 100, providing raw data for determining sebum characteristics.
一旦影像被捕捉,便執行步驟S120,所輸入的影像就被劃分為不重疊的區塊。這個劃分過程由區塊提取模組120進行,該區塊提取模組120將高解析度 頭皮影像分割成較小、易於管理的部分。每個區塊代表頭皮的特定區域,這種基於區塊的方法允許之後對頭皮皮脂特性進行更詳細和局部化的分析。 Once the image is captured, step S120 is performed and the input image is segmented into non-overlapping blocks. This segmentation process is performed by the block extraction module 120, which segments the high-resolution scalp image into smaller, more manageable parts. Each block represents a specific area of the scalp, and this block-based approach allows for a more detailed and localized analysis of scalp sebum properties at a later time.
在區塊提取之後,執行步驟S130,數據增強模組130對區塊進行隨機旋轉和位置交換。此步驟將變異性引入數據,這有助於通過將人工智能模型暴露於更廣範圍的數據情境中來增強人工智能模型的穩健性。此外,區塊的隨機旋轉和位置交換也作為一種隱私保護措施。通過打亂區塊的原始排列,頭皮皮脂特性自動分類系統100使得重建原始頭皮影像變得困難,從而保護個人的隱私。 After the block extraction, step S130 is executed, and the data enhancement module 130 randomly rotates and swaps the blocks. This step introduces variability into the data, which helps to enhance the robustness of the artificial intelligence model by exposing the artificial intelligence model to a wider range of data scenarios. In addition, the random rotation and position swap of the blocks also serve as a privacy protection measure. By disrupting the original arrangement of the blocks, the scalp sebum characteristics automatic classification system 100 makes it difficult to reconstruct the original scalp image, thereby protecting personal privacy.
然後,執行步驟S140,每個區塊由向量轉換模組140轉換為一維向量。此轉換過程涉及將二維區塊壓平為一維像素值陣列。所得的向量保留了區塊的像素強度資訊,但其格式更適合由系統的後續元件進行處理。 Then, step S140 is executed, and each block is converted into a one-dimensional vector by the vector conversion module 140. This conversion process involves flattening the two-dimensional block into a one-dimensional array of pixel values. The resulting vector retains the pixel intensity information of the block, but its format is more suitable for processing by subsequent components of the system.
接著,執行步驟S150,通過可學習的嵌入向量,將位置資訊添加到一維向量中。此步驟由位置嵌入模組150進行,該位置嵌入模組150向向量添加了一層空間資訊。可學習的嵌入向量編碼了區塊11在原始頭皮影像中的相對位置,使頭皮皮脂特性自動分類系統100能夠保留一些空間脈絡。 Next, step S150 is performed to add position information to the one-dimensional vector through a learnable embedding vector. This step is performed by a position embedding module 150, which adds a layer of spatial information to the vector. The learnable embedding vector encodes the relative position of block 11 in the original scalp image, allowing the scalp sebum characteristics automatic classification system 100 to retain some spatial context.
值得注意的是,位置嵌入模組150可以有多種可能的配置。請參照圖5A,位置嵌入模組150可以包括至少一特徵提取模組152、至少一激活函數模組154、與至少一標準化模組156。其中,特徵提取模組152用於對區塊的一維向量進行變換,激活函數模組154用於引入非線性,而標準化模組156則用於將輸出值進行標準化。 It is worth noting that the position embedding module 150 can have multiple possible configurations. Referring to FIG. 5A , the position embedding module 150 can include at least one feature extraction module 152, at least one activation function module 154, and at least one standardization module 156. The feature extraction module 152 is used to transform the one-dimensional vector of the block, the activation function module 154 is used to introduce nonlinearity, and the standardization module 156 is used to standardize the output value.
再來,執行步驟S160,增強了位置嵌入的向量被輸入到視覺變換模型160中。視覺變換模型160是一種專為影像分析任務設計的人工智能模型。它包含多層自我注意機制和前向神經網絡,這些機制共同工作以分析輸入向量並提取與頭皮皮脂特性相關的有意義的特徵。 Next, step S160 is performed, and the vector with enhanced position embedding is input into the visual transformation model 160. The visual transformation model 160 is an artificial intelligence model designed specifically for image analysis tasks. It contains a multi-layer self-attention mechanism and a forward neural network, which work together to analyze the input vector and extract meaningful features related to the characteristics of scalp sebum.
最後,執行步驟S170,視覺變換模型160輸出一個皮脂分類標籤。此標籤指示輸入影像所代表的頭皮部分的皮脂特性,並且可以是以下三種類別之一:乾性、中性或油性。分類標籤作為頭皮皮脂特性自動分類系統100的最終輸出,提供了對分析的頭皮皮脂特性的簡明標示。 Finally, step S170 is executed, and the visual transformation model 160 outputs a sebum classification label. This label indicates the sebum characteristics of the scalp portion represented by the input image, and can be one of the following three categories: dry, neutral, or oily. The classification label, as the final output of the scalp sebum characteristic automatic classification system 100, provides a concise labeling of the analyzed scalp sebum characteristics.
以下,將對上述之頭皮皮脂特性自動分類系統與方法進行更深入的描述,請繼續參照圖1與圖2。在自動分類過程的初始階段,亦即:步驟S110,捕捉頭皮部分的高解析度影像10(如圖3A所示)。此影像捕捉可以使用各種成像裝置110進行,例如數位相機、智能手機相機或專門的皮膚科成像裝置。成像裝置110的位置設定為能夠捕捉頭皮部分清晰且詳細的視圖。捕捉的影像10的解析度足夠高,以允許對頭皮表面進行詳細分析,包括可能指示皮脂特性的質地、顏色和其他視覺特性。 Below, the above-mentioned automatic classification system and method of scalp sebum characteristics will be described in more depth, please continue to refer to Figures 1 and 2. At the initial stage of the automatic classification process, that is, step S110, a high-resolution image 10 of the scalp portion is captured (as shown in Figure 3A). This image capture can be performed using various imaging devices 110, such as digital cameras, smart phone cameras, or specialized dermatology imaging devices. The imaging device 110 is positioned to capture a clear and detailed view of the scalp portion. The resolution of the captured image 10 is high enough to allow detailed analysis of the scalp surface, including texture, color, and other visual characteristics that may indicate sebum characteristics.
一旦捕捉了頭皮部分的高解析度影像,它們就由區塊提取模組120進行處理。如步驟S120所示,該區塊提取模組120負責將影像劃分為不重疊的區塊11(如圖3B所示)。劃分過程涉及將影像分割成較小的部分,亦即:區塊11,每個部分代表頭皮的特定區域。區塊11的大小可以根據各種因素來確定,例如影像的解析度、分析中所需的詳細程度以及可用的計算資源。每個區塊11被視為獨立的分析單位,允許對頭皮皮脂特性進行更局部化和詳細的檢查。 Once the high-resolution images of the scalp portion are captured, they are processed by the block extraction module 120. As shown in step S120, the block extraction module 120 is responsible for dividing the image into non-overlapping blocks 11 (as shown in Figure 3B). The segmentation process involves dividing the image into smaller parts, namely: blocks 11, each of which represents a specific area of the scalp. The size of the block 11 can be determined based on various factors, such as the resolution of the image, the level of detail required in the analysis, and the available computing resources. Each block 11 is treated as an independent analysis unit, allowing for a more localized and detailed examination of the scalp sebum characteristics.
區塊提取過程的設計是為了確保每個區塊11包含足夠的資訊進行後續分析。為此,區塊11以一種方式被提取,使它們覆蓋了影像中描繪的頭皮部分的全部範圍,而不與其他區塊重疊。這種不重疊的排列確保了頭皮的每個區域只被分析一次,防止了分析中的冗餘。此外,不重疊的排列也有助於維護原始影像的空間完整性,因為每個區塊11對應於頭皮的明確且特定區域。 The block extraction process is designed to ensure that each block 11 contains sufficient information for subsequent analysis. To this end, blocks 11 are extracted in a way that they cover the entire extent of the scalp portion depicted in the image without overlapping with other blocks. This non-overlapping arrangement ensures that each area of the scalp is analyzed only once, preventing redundancy in the analysis. In addition, the non-overlapping arrangement also helps to maintain the spatial integrity of the original image, as each block 11 corresponds to a clear and specific area of the scalp.
總之,捕捉頭皮部分的高解析度影像10並將這些影像劃分為不重疊的區塊11的過程,確保了頭皮皮脂特性自動分類系統100可以獲取關於頭皮的詳細和局部化的視覺資訊,然後用於以可靠和高效的方式確定皮脂特性。 In summary, the process of capturing high-resolution images of scalp portions 10 and segmenting these images into non-overlapping blocks 11 ensures that the automatic scalp sebum property classification system 100 can obtain detailed and localized visual information about the scalp, which is then used to determine sebum properties in a reliable and efficient manner.
在從高解析度頭皮影像10中提取區塊11後,頭皮皮脂特性自動分類系統100使用數據增強模組130對區塊11進行隨機旋轉和位置交換(如圖3C所示)。此數據增強模組130將一定程度的隨機性引入,這有兩個主要目的。 After extracting block 11 from high-resolution scalp image 10, scalp sebum characteristics automatic classification system 100 uses data enhancement module 130 to randomly rotate and swap the position of block 11 (as shown in FIG3C). This data enhancement module 130 introduces a certain degree of randomness, which has two main purposes.
首先,區塊11的隨機旋轉和位置交換有助於增強視覺變換模型160的穩健性。在機器學習中,穩健性指的是模型在面對輸入數據變化時能夠維持其性能的能力。通過將隨機性引入,頭皮皮脂特性自動分類系統100將視覺變換模型160暴露於更廣範圍的數據情境中,從而鼓勵視覺變換模型160學習更通用且穩健的頭皮皮脂特性表示。這在解決類別不平衡問題時特別有益,其中某些皮脂特性類別可能在訓練數據中代表性不足。通過隨機旋轉和交換區塊的位置,頭皮皮脂特性自動分類系統100有效地增加了每個類別的訓練數據多樣性,有助於緩解類別不平衡的影響並提高模型的整體性能。 First, the random rotation and position swapping of block 11 helps to enhance the robustness of the visual transformation model 160. In machine learning, robustness refers to the ability of a model to maintain its performance in the face of changes in input data. By introducing randomness, the scalp sebum property automatic classification system 100 exposes the visual transformation model 160 to a wider range of data scenarios, thereby encouraging the visual transformation model 160 to learn a more general and robust representation of scalp sebum properties. This is particularly beneficial in solving the problem of class imbalance, where certain sebum property categories may be underrepresented in the training data. By randomly rotating and swapping the positions of blocks, the scalp sebum characteristics automatic classification system 100 effectively increases the diversity of training data for each category, which helps to alleviate the impact of category imbalance and improve the overall performance of the model.
其次,區塊11的隨機旋轉和位置交換作為一種隱私保護措施。在本實施例中,隱私保護指的是保護被分析的頭皮影像的個人身份。通過打亂區塊11的原始排列,能使從處理過的數據重建原始頭皮影像變得困難。這意味著即使有人未經授權獲取數據,讓有心人無法從打亂的區塊中辨識出個人的身份。這一特性在個人隱私至關重要的應用中特別有價值,例如在醫療診斷或個人護理應用中。 Secondly, the random rotation and position swapping of block 11 serves as a privacy protection measure. In this embodiment, privacy protection refers to protecting the identity of the individual in the scalp image being analyzed. By scrambling the original arrangement of block 11, it becomes difficult to reconstruct the original scalp image from the processed data. This means that even if someone obtains the data without authorization, the person cannot identify the individual from the scrambled blocks. This feature is particularly valuable in applications where personal privacy is critical, such as in medical diagnosis or personal care applications.
綜上,數據增強模組130通過區塊11的隨機旋轉和位置交換增強了視覺變換模型160的穩健性並保護了個人的隱私。通過區塊11的隨機旋轉和位置交 換,系統能夠處理數據中的微妙特徵差異和類別不平衡,同時確保被分析的頭皮影像的個人隱私。 In summary, the data enhancement module 130 enhances the robustness of the visual transformation model 160 and protects personal privacy through random rotation and position swapping of block 11. Through random rotation and position swapping of block 11, the system is able to handle subtle feature differences and class imbalance in the data while ensuring the personal privacy of the analyzed scalp image.
在數據增強過程之後,執行步驟S140,頭皮皮脂特性自動分類系統100繼續將每個區塊11轉換為一維向量。這種轉換由向量轉換模組140進行,該向量轉換模組140將二維區塊11轉換為一維像素值陣列。轉換過程涉及將區塊11壓平,這基本上涉及將像素值從二維網格重新排列成一維序列。此過程保留了區塊11的像素強度資訊,但將其呈現為更適合由頭皮皮脂特性自動分類系統100後續元件處理的格式。 After the data enhancement process, step S140 is executed and the scalp sebum characteristics automatic classification system 100 continues to convert each block 11 into a one-dimensional vector. This conversion is performed by the vector conversion module 140, which converts the two-dimensional block 11 into a one-dimensional array of pixel values. The conversion process involves flattening the block 11, which basically involves rearranging the pixel values from the two-dimensional grid into a one-dimensional sequence. This process retains the pixel intensity information of the block 11, but presents it in a format more suitable for processing by subsequent components of the scalp sebum characteristics automatic classification system 100.
一旦區塊11被轉換為一維向量,執行步驟S150,頭皮皮脂特性自動分類系統100就通過可學習的嵌入向量為這些一維向量添加位置資訊。這一步由位置嵌入模組150進行,該位置嵌入模組150設計用於編碼區塊11在原始頭皮影像中的相對位置。可學習的嵌入向量本質上是一組在視覺變換模型的訓練過程中學習的參數。這些參數代表了區塊11之間的空間關係,從而使系統能夠保留一些空間脈絡,儘管進行了壓平處理。 Once the blocks 11 are converted into one-dimensional vectors, step S150 is executed, and the automatic scalp sebum characteristics classification system 100 adds position information to these one-dimensional vectors through learnable embedding vectors. This step is performed by the position embedding module 150, which is designed to encode the relative position of the block 11 in the original scalp image. The learnable embedding vector is essentially a set of parameters learned during the training of the visual transformation model. These parameters represent the spatial relationship between blocks 11, allowing the system to retain some spatial context despite the flattening process.
添加位置資訊到一維向量的過程涉及一系列操作,請同時參照圖4。首先,如步驟S210所示,每個區塊11根據其在原始頭皮影像10中的位置被分配一個位置索引。此位置索引作為一種空間元數據,提供了有關區塊位置的額外脈絡。然後,如步驟S220所示,位置索引通過可學習的嵌入層轉換為更高維度的表示。該層本質上是一個具有可學習參數的查找表,將位置索引映射到實數的密集向量。所得的向量,稱為位置嵌入,編碼了區塊在頭皮影像中的相對位置。 The process of adding position information to a one-dimensional vector involves a series of operations, please refer to Figure 4. First, as shown in step S210, each block 11 is assigned a position index according to its position in the original scalp image 10. This position index, as a kind of spatial metadata, provides additional context about the position of the block. Then, as shown in step S220, the position index is transformed into a higher-dimensional representation through a learnable embedding layer. This layer is essentially a lookup table with learnable parameters that maps the position index to a dense vector of real numbers. The resulting vector, called a position embedding, encodes the relative position of the block in the scalp image.
然後,如步驟S230所示,將位置嵌入添加到表示區塊11的一維向量中。此加法操作有效地將區塊的像素強度資訊與位置嵌入中編碼的空間資訊結合起 來。所得的向量現在包含像素強度和位置資訊,然後準備輸入到視覺變換模型160進行進一步處理。 Then, as shown in step S230, the position embedding is added to the one-dimensional vector representing the block 11. This addition operation effectively combines the pixel intensity information of the block with the spatial information encoded in the position embedding. The resulting vector now contains both pixel intensity and position information and is then ready to be input to the visual transformation model 160 for further processing.
總之,將每個區塊11轉換為一維向量並通過可學習的嵌入添加位置資訊的過程是頭皮皮脂特性自動分類系統100工作流程中的關鍵步驟。此過程確保視覺變換模型160接收到包含像素強度和空間資訊的全面輸入數據,從而實現對頭皮皮脂特性的更準確和全域感知的分析。 In summary, the process of converting each block 11 into a one-dimensional vector and adding position information through learnable embedding is a key step in the workflow of the automatic scalp sebum property classification system 100. This process ensures that the visual transformation model 160 receives comprehensive input data containing pixel intensity and spatial information, thereby achieving a more accurate and global-aware analysis of scalp sebum properties.
另外,關於位置嵌入模組150的架構的其中一實施例如圖5B所示。首先,位置嵌入模組150包括一第一全連接層152A,該第一全連接層152A用於對區塊11的一維向量進行線性變換。全連接層是神經網絡中的一種基本組件,它的功能是將每個輸入節點(或神經元)連接到每個輸出節點。在這裡,第一全連接層152A的作用是將區塊的一維向量進行線性變換,以提取更高級別的特徵。此外,位置嵌入模組150還包括一第二全連接層152B,該第二全連接層152B與第一全連接層152A相連,用於對第一全連接層152A的輸出進行進一步的線性變換,其是為了進一步提取和轉換特徵,以便更好地捕捉區塊11的一維向量中的複雜模式。位置嵌入模組150還包括一個GELU激活函數154A,其與第二全連接層152B相連,用於對第二全連接層152B的輸出引入非線性。GELU激活函數154A是一種常用的激活函數,它可以引入非線性,使得位置嵌入模組150能夠學習並表示更複雜的函數。此外,位置嵌入模組150還包括一Sigmoid激活函數156A,其與GELU激活函數154A相連,用於將GELU激活函數154A的輸出值轉換到範圍[0,1]。Sigmoid激活函數156A是一種將實數壓縮到0和1之間的函數,這使得模型的輸出可以被解釋為概率。 In addition, one embodiment of the architecture of the position embedding module 150 is shown in FIG5B . First, the position embedding module 150 includes a first fully connected layer 152A, which is used to perform a linear transformation on the one-dimensional vector of the block 11. The fully connected layer is a basic component in a neural network, and its function is to connect each input node (or neuron) to each output node. Here, the role of the first fully connected layer 152A is to perform a linear transformation on the one-dimensional vector of the block to extract higher-level features. In addition, the position embedding module 150 also includes a second fully connected layer 152B, which is connected to the first fully connected layer 152A and is used to perform a further linear transformation on the output of the first fully connected layer 152A, in order to further extract and transform features so as to better capture the complex pattern in the one-dimensional vector of block 11. The position embedding module 150 also includes a GELU activation function 154A, which is connected to the second fully connected layer 152B and is used to introduce nonlinearity to the output of the second fully connected layer 152B. The GELU activation function 154A is a commonly used activation function that can introduce nonlinearity, allowing the position embedding module 150 to learn and represent more complex functions. In addition, the position embedding module 150 also includes a Sigmoid activation function 156A, which is connected to the GELU activation function 154A and is used to convert the output value of the GELU activation function 154A to the range [0,1]. The Sigmoid activation function 156A is a function that compresses real numbers between 0 and 1, so that the output of the model can be interpreted as probability.
在圖5B中,第一全連接層152A與第二全連接層152B是對應到圖5A的特徵提取模組152,GELU激活函數154A是對應到圖5A的激活函數模組154, 而標準化模組156則對應到圖5A的標準化模組156。當然,本領域據有通常知識者可以。當然,本領域據有通常知識者可以依需要採用不同的實施方式。舉例來說,特徵提取模組152可以包括更多或更好的全連接層,激活函數模組154也可以為Maxout激活函數、RELU激活函數、或SELU激活函數,而標準化模組156則可以為一般標準化公式。 In FIG. 5B , the first fully connected layer 152A and the second fully connected layer 152B correspond to the feature extraction module 152 of FIG. 5A , the GELU activation function 154A corresponds to the activation function module 154 of FIG. 5A , and the normalization module 156 corresponds to the normalization module 156 of FIG. 5A . Of course, a person with ordinary knowledge in the field can. Of course, a person with ordinary knowledge in the field can adopt different implementation methods as needed. For example, the feature extraction module 152 can include more or better fully connected layers, the activation function module 154 can also be a Maxout activation function, a RELU activation function, or a SELU activation function, and the normalization module 156 can be a general normalization formula.
總之,位置嵌入模組150能夠從區塊11的一維向量中提取出有用的特徵,並將這些特徵轉換成一種形式,使得模型能夠更好地進行學習和預測。 In summary, the position embedding module 150 is able to extract useful features from the one-dimensional vector of block 11 and transform these features into a form that enables the model to learn and predict better.
請同時參照圖6,視覺變換模型160是頭皮皮脂特性自動分類系統100的核心元件,負責處理輸入向量並輸出皮脂分類標籤。視覺變換模型160是一種專為影像分析任務設計的人工智能模型。它基於變換器(Transformer)的架構,該架構最初是為自然語言處理任務開發的,但已被適應用於電腦視覺。 Please refer to FIG. 6 , the visual transformation model 160 is the core component of the scalp sebum characteristic automatic classification system 100 , which is responsible for processing the input vector and outputting the sebum classification label. The visual transformation model 160 is an artificial intelligence model designed specifically for image analysis tasks. It is based on the Transformer architecture, which was originally developed for natural language processing tasks but has been adapted for computer vision.
視覺變換模型160包含多層的自我注意機制162和前向神經網絡164。自我注意機制162允許視覺變換模型160根據它們對手頭任務的相關性專注於輸入數據的不同部分。在本實施例中,自我注意機制162使視覺變換模型160能夠專注於頭皮影像10的不同區塊11,對於皮脂分類任務包含更多資訊的區塊給予更多的關注。 The visual transformation model 160 includes a multi-layer self-attention mechanism 162 and a forward neural network 164. The self-attention mechanism 162 allows the visual transformation model 160 to focus on different parts of the input data according to their relevance to the task at hand. In this embodiment, the self-attention mechanism 162 enables the visual transformation model 160 to focus on different blocks 11 of the scalp image 10, giving more attention to blocks that contain more information for the sebum classification task.
視覺變換模型160中的每一層自我注意機制162都通過計算輸入向量的加權和來運作,其中權重由每個向量與其他向量的相關性決定。這種相關性使用稱為注意分數的度量來量化,該度量基於向量之間的相似性來計算。然後使用注意分數來加權輸入向量,使視覺變換模型160能夠更專注於分數較高的向量。 Each layer of the self-attention mechanism 162 in the visual transformation model 160 operates by computing a weighted sum of the input vectors, where the weights are determined by how relevant each vector is to the other vectors. This relevance is quantified using a metric called an attention score, which is calculated based on the similarity between vectors. The attention score is then used to weight the input vectors, allowing the visual transformation model 160 to focus more on vectors with higher scores.
視覺變換模型160中的前向神經網絡164用於將輸入向量的加權和轉換為更高級別的表示。這些前向神經網絡164由多層神經元組成,每一層都對其輸 入進行線性變換,然後使用非線性激活函數。前向神經網絡164的輸出是一組特徵向量,捕捉了輸入數據中的高級別模式。 The feedforward neural network 164 in the visual transformation model 160 is used to transform the weighted sum of the input vectors into a higher-level representation. These feedforward neural networks 164 are composed of multiple layers of neurons, each of which performs a linear transformation on its input and then uses a nonlinear activation function. The output of the feedforward neural network 164 is a set of feature vectors that capture the high-level patterns in the input data.
視覺變換模型160以順序方式處理輸入向量,將它們逐層通過自我注意機制162和前向神經網絡164。在每一層,視覺變換模型160根據從前一層提取的資訊更新特徵向量。這種迭代過程使視覺變換模型160能夠逐漸精煉對輸入數據的理解,從而導致更準確的皮脂分類結果。 The visual transformation model 160 processes input vectors in a sequential manner, passing them layer by layer through the self-attention mechanism 162 and the forward neural network 164. At each layer, the visual transformation model 160 updates the feature vector based on the information extracted from the previous layer. This iterative process enables the visual transformation model 160 to gradually refine its understanding of the input data, resulting in more accurate sebum classification results.
最後,視覺變換模型160根據最終的特徵向量集輸出一個皮脂分類標籤166。此皮脂分類標籤166指示輸入影像所代表的頭皮部分的皮脂特性,並且可以是以下三種類別之一:乾性、中性或油性。皮脂分類標籤166作為頭皮皮脂特性自動分類系統100的最終輸出,提供了對分析的頭皮皮脂特性的簡明指標。 Finally, the visual transformation model 160 outputs a sebum classification label 166 based on the final feature vector set. This sebum classification label 166 indicates the sebum characteristics of the scalp portion represented by the input image, and can be one of the following three categories: dry, normal, or oily. The sebum classification label 166, as the final output of the scalp sebum characteristic automatic classification system 100, provides a concise indicator of the analyzed scalp sebum characteristics.
綜上所述,頭皮皮脂特性自動分類系統100的兩個主要技術改進對其性能和隱私保護有著重大貢獻:區塊11的隨機位置變換和旋轉,以及使用可學習的位置編碼。 In summary, two major technical improvements of the automatic classification system for scalp sebum characteristics 100 make significant contributions to its performance and privacy protection: random position transformation and rotation of block 11, and the use of learnable position encoding.
區塊11的隨機位置變換和旋轉由數據增強模組130執行。數據增強模組130將一定程度的隨機性引入數據,這有兩個主要目的。首先,它增強了視覺變換模型160的穩健性,通過將視覺變換模型160暴露於更廣範圍的數據情境中。這在解決類別不平衡問題時特別有益,其中某些皮脂特性類別可能在訓練數據中代表性不足。通過隨機旋轉和交換區塊11的位置,頭皮皮脂特性自動分類系統100有效地增加了每個類別的訓練數據多樣性,有助於緩解類別不平衡的影響並提高模型的整體性能。 The random position shifting and rotation of block 11 is performed by the data augmentation module 130. The data augmentation module 130 introduces a degree of randomness into the data, which has two main purposes. First, it enhances the robustness of the visual transformation model 160 by exposing the visual transformation model 160 to a wider range of data scenarios. This is particularly beneficial when addressing class imbalance problems, where certain sebum property classes may be underrepresented in the training data. By randomly rotating and swapping the position of block 11, the scalp sebum property automatic classification system 100 effectively increases the diversity of the training data for each class, helping to mitigate the effects of class imbalance and improve the overall performance of the model.
其次,區塊11的隨機旋轉和位置交換作為一種隱私保護措施。通過打亂區塊11的原始排列,頭皮皮脂特性自動分類系統100使得重建原始頭皮影像變得 困難,從而保護個人的隱私。這一特性在個人隱私至關重要的應用中特別有價值,例如在醫療診斷或個人護理應用中。 Secondly, the random rotation and position swapping of block 11 serves as a privacy protection measure. By disrupting the original arrangement of block 11, the scalp sebum characteristics automatic classification system 100 makes it difficult to reconstruct the original scalp image, thereby protecting the privacy of the individual. This feature is particularly valuable in applications where personal privacy is critical, such as in medical diagnosis or personal care applications.
頭皮皮脂特性自動分類系統100中另一個值得注意的技術改進是使用可學習的嵌入向量。這個特性由位置嵌入模組150實現,該位置嵌入模組150為代表每個區塊的一維向量添加了一層空間資訊,使頭皮皮脂特性自動分類系統100能夠保留一些空間脈絡。這對於視覺變換模型160特別有利,因為它允許視覺變換模型160適應數據中的特定空間關係,從而實現更準確的分類。 Another notable technical improvement in the automatic classification system for scalp sebum characteristics 100 is the use of learnable embedding vectors. This feature is implemented by the position embedding module 150, which adds a layer of spatial information to the one-dimensional vector representing each block, allowing the automatic classification system for scalp sebum characteristics 100 to retain some spatial context. This is particularly beneficial for the visual transformation model 160 because it allows the visual transformation model 160 to adapt to specific spatial relationships in the data, thereby achieving more accurate classification.
總之,區塊11的隨機位置變換和旋轉,以及使用可學習的嵌入向量,是本發明之頭皮皮脂特性自動分類系統100中兩個主要的技術改進,這些改進提升了其性能並保護了隱私。這些特性確保了頭皮皮脂特性自動分類系統100能夠處理數據中的微妙特徵差異和類別不平衡,同時確保了被分析的頭皮影像的個人隱私。 In summary, the random position transformation and rotation of block 11, as well as the use of learnable embedding vectors, are two major technical improvements in the scalp sebum characteristics automatic classification system 100 of the present invention, which improve its performance and protect privacy. These features ensure that the scalp sebum characteristics automatic classification system 100 can handle subtle feature differences and category imbalances in the data, while ensuring the privacy of the analyzed scalp images.
雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Anyone with common knowledge in the relevant technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of the patent application attached hereto.
S110~S170:流程圖步驟 S110~S170: Flowchart steps
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112145307A TWI880479B (en) | 2023-11-23 | 2023-11-23 | Automated classification system and method for scalp sebum properties |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112145307A TWI880479B (en) | 2023-11-23 | 2023-11-23 | Automated classification system and method for scalp sebum properties |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI880479B true TWI880479B (en) | 2025-04-11 |
| TW202522514A TW202522514A (en) | 2025-06-01 |
Family
ID=96141684
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112145307A TWI880479B (en) | 2023-11-23 | 2023-11-23 | Automated classification system and method for scalp sebum properties |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI880479B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220375601A1 (en) * | 2021-05-21 | 2022-11-24 | The Procter & Gamble Company | Artificial intelligence based systems and methods for analyzing user-specific skin or hair data to predict user-specific skin or hair conditions |
| TW202312096A (en) * | 2021-09-13 | 2023-03-16 | 美科實業股份有限公司 | Intelligent dandruff detection system and method |
| CN116955983A (en) * | 2023-02-14 | 2023-10-27 | 腾讯科技(深圳)有限公司 | Training method, device, equipment and storage medium of electroencephalogram analysis model |
-
2023
- 2023-11-23 TW TW112145307A patent/TWI880479B/en active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220375601A1 (en) * | 2021-05-21 | 2022-11-24 | The Procter & Gamble Company | Artificial intelligence based systems and methods for analyzing user-specific skin or hair data to predict user-specific skin or hair conditions |
| TW202312096A (en) * | 2021-09-13 | 2023-03-16 | 美科實業股份有限公司 | Intelligent dandruff detection system and method |
| CN116955983A (en) * | 2023-02-14 | 2023-10-27 | 腾讯科技(深圳)有限公司 | Training method, device, equipment and storage medium of electroencephalogram analysis model |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202522514A (en) | 2025-06-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| George et al. | On the effectiveness of vision transformers for zero-shot face anti-spoofing | |
| Zhang et al. | Generative adversarial and self-supervised dehazing network | |
| CN113283446B (en) | Method and device for identifying object in image, electronic equipment and storage medium | |
| CN114708455B (en) | Hyperspectral image and LiDAR data collaborative classification method | |
| Liu et al. | Dendritic deep learning for medical segmentation | |
| CN112102200B (en) | Image complement model initialization method, training method and image complement method | |
| CN111127308A (en) | Mirror image feature rearrangement repairing method for single sample face recognition under local shielding | |
| Chen et al. | Memory-oriented unpaired learning for single remote sensing image dehazing | |
| CN117854138B (en) | Information acquisition and analysis method, device, equipment and storage medium based on big data | |
| Li et al. | Image operation chain detection with machine translation framework | |
| CN119323565A (en) | Transformer fault detection method based on improved YOLOv model | |
| CN119090780A (en) | Ancient book text image restoration method based on dual-stream fusion restoration of glyph texture and structure | |
| Zhou et al. | Deep blind image quality assessment using dynamic neural model with dual-order statistics | |
| Lan et al. | No-Reference Image Quality Assessment: Exploring Intrinsic Distortion Characteristics via Generative Noise Estimation with Mamba | |
| TWI880479B (en) | Automated classification system and method for scalp sebum properties | |
| Khazem et al. | PolygoNet: Leveraging Simplified Polygonal Representation for Effective Image Classification | |
| CN119470946B (en) | Automatic urine sample detection method, device and equipment based on intelligent poison detection machine | |
| CN115272527A (en) | Image coloring method based on color disc countermeasure network | |
| Madhu et al. | CNN approach for medical image authentication | |
| US20250173858A1 (en) | Automatic scalp sebum classification system and method for automatic classification of scalp sebum | |
| CN116934566A (en) | Medical image robust zero watermarking algorithm based on DO-VGG network | |
| Das et al. | Spliced region detection and localization in digital images based on CNN learning guided by color transitions and surface texture | |
| Tang et al. | ImageShield: a responsibility-to-person blind watermarking mechanism for image datasets protection | |
| Raheem et al. | Enhancing the Image Forgery Detection based Machine Learning Approach using Multiple Datasets | |
| CN115116120A (en) | Facial expression image analysis method based on depth self-encoder |