TWI701640B - Ovulation prediction method based on saliva crystallization - Google Patents

Ovulation prediction method based on saliva crystallization Download PDF

Info

Publication number
TWI701640B
TWI701640B TW108114662A TW108114662A TWI701640B TW I701640 B TWI701640 B TW I701640B TW 108114662 A TW108114662 A TW 108114662A TW 108114662 A TW108114662 A TW 108114662A TW I701640 B TWI701640 B TW I701640B
Authority
TW
Taiwan
Prior art keywords
image
ovulation
saliva
crystallization
interest
Prior art date
Application number
TW108114662A
Other languages
Chinese (zh)
Other versions
TW202040516A (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 TW108114662A priority Critical patent/TWI701640B/en
Application granted granted Critical
Publication of TWI701640B publication Critical patent/TWI701640B/en
Publication of TW202040516A publication Critical patent/TW202040516A/en

Links

Images

Abstract

An ovulation prediction method based on saliva crystallization, comprises: obtaining a pre-identified image for use as a basis for determining an ovulation state; performing a one-color conversion step on the pre-identified image, and obtaining a conversion by filtering a specific color the image, the converted image is beneficial to the pre-identification determination and the subsequent ovulation state identification; the converted image is subjected to a color detection step for confirming whether the pre-identified image is a valid image; and the converted image is subjected to an area selecting a step and obtaining an image block of interest; performing a crystallization state classification step, classifying the image of interest image by crystallization; and performing an ovulation state determination step, and locating the image block of interest obtained by the crystallization state classification step the image is judged by the final result, and the pre-identified image is judged to be an ovulation period or a non-ovulation period. The ovulation prediction method based on saliva crystallization of the present invention can ensure that the pre-identified image obtained by the user is an effective image, which can increase the recognition success rate and avoid misinterpretation.

Description

基於唾液結晶的排卵預測方法Ovulation prediction method based on saliva crystallization

本發明係關於一種排卵預測方法,尤其是一種基於唾液結晶的排卵預測方法。 The present invention relates to a method for predicting ovulation, especially a method for predicting ovulation based on saliva crystals.

目前女性為了檢測排卵的狀態最常見的方式就是去醫院,經由專業醫師透過驗尿或其他更機密的檢測方式來得知,惟前述方式除了會因為個人因素不方便執行外,也常因為到醫院檢查需耗費大量時間及繁複手續,因此,隨著影像辨識技術、攝像裝置及智慧手機的發展,已經有越來越便利的方式可以透過一些簡易裝置來自行檢測,例如透過唾液檢測的方式來判斷女性排卵的狀態。 At present, the most common way for women to check the status of ovulation is to go to the hospital, which can be known by professional doctors through urine tests or other more confidential testing methods. However, the aforementioned methods are not only inconvenient for personal reasons, but also often because of going to the hospital for examination. It takes a lot of time and complicated procedures. Therefore, with the development of image recognition technology, camera devices, and smart phones, there have been more and more convenient ways to perform self-detection through some simple devices, such as saliva detection to determine women The state of ovulation.

習知技術I569766提供一種用於預測女性排卵期之唾液影像辨識方法,可供簡單、快速、安全與準確地自動檢測分析女性的唾液影像,並由該唾液影像自動判斷該女性係處於非排卵期、可能排卵期以及排卵期之其中一者,藉此,得幫助使用者預測排卵期。 The conventional technology I569766 provides a saliva image recognition method for predicting the ovulation period of women, which can be used to automatically detect and analyze women's saliva images simply, quickly, safely and accurately, and automatically determine that the female is in the non-ovulatory period from the saliva images , One of the possible ovulation period and the ovulation period, thereby helping the user to predict the ovulation period.

惟,習知技術I569766係利用黑白像素數量密度和門檻值來判定一影像,該門檻值因使用者不同而需由使用者自行定義或是分析使用者一段時間後統計數據來定義。由於乾唾液之結晶圖案,在不同時期可能會出現很多點狀或 羊齒狀,也有可能出現很少的點狀或羊齒狀,因此用像素數量密度的辨識成功率不佳,且門檻值也不是每一位使用者都懂的自行做調整,反而容易造成辨識結果的誤差,因此有必要加以改良。 However, the conventional technology I569766 uses the number density of black and white pixels and the threshold value to determine an image. The threshold value needs to be defined by the user or by analyzing the statistical data of the user after a period of time. Due to the crystalline pattern of dried saliva, there may be many dots or Fern-shaped, there may be very few dots or fern-shaped, so the recognition success rate with pixel density is not good, and the threshold value is not that every user understands to make adjustments by himself, but it is easy to cause recognition The result of the error, so it is necessary to improve.

本發明之一目的在提供一種基於唾液結晶的排卵預測方法,該基於唾液結晶的排卵預測方法提供使用者透過唾液影像來自行判斷排卵狀態。 One object of the present invention is to provide a method for predicting ovulation based on saliva crystals, which provides users with a self-determining ovulation status through saliva images.

本發明之另一目的在提供一種基於唾液結晶的排卵預測方法,該基於唾液結晶的排卵預測方法提供更精準的排卵狀態判斷。 Another object of the present invention is to provide a method for predicting ovulation based on saliva crystals, which provides a more accurate judgment of ovulation status.

本發明之再一目的在提供一種基於唾液結晶的排卵預測方法,該基於唾液結晶的排卵預測方法提供使用者重新取得較佳的唾液影像以進行辨識。 Another object of the present invention is to provide a method for predicting ovulation based on saliva crystals, which allows users to obtain better saliva images for identification.

為達成上述及其他目的,本發明之基於唾液結晶的排卵預測方法在一個實施例中包含:取得一預辨識影像,該預辨識影像用以作為判斷排卵狀態的依據;將該預辨識影像進行一色系轉換步驟,並經由過濾特定顏色後取得一轉換影像,該轉換影像有利於該預辨識合格之判斷及後續排卵狀態辨識;將該轉換影像進行一顏色偵測步驟,用以確認該預辨識影像是否為有效之影像;將該轉換影像進行一區域選取步驟,並取得一興趣影像區塊;執行一結晶狀態分類步驟,將該興趣影像區塊進行結晶狀態分類;及執行一排卵狀態判斷步驟,將該結晶狀態分類步驟所得之該興趣影像區塊之影像做最終結果判斷,判斷該預辨識影像為排卵期或非排卵期。 In order to achieve the above and other objectives, the method for predicting ovulation based on saliva crystals in one embodiment of the present invention includes: obtaining a pre-identified image, which is used as a basis for determining the ovulation state; and performing one color on the pre-identified image It is a conversion step, and a conversion image is obtained by filtering a specific color, and the conversion image is beneficial to the judgment of the pre-recognition qualified and subsequent ovulation status recognition; the conversion image is subjected to a color detection step to confirm the pre-recognition image Whether it is a valid image; perform a region selection step on the converted image and obtain an image block of interest; perform a crystallization state classification step to classify the crystallization state of the image block of interest; and perform an ovulation state determination step, The final result judgment is made on the image of the interest image block obtained by the crystallization state classification step, and it is judged whether the pre-identified image is an ovulation period or a non-ovulation period.

在本發明的一些實施例中,其中,該色系轉換步驟另包含執行一重新取得預辨識影像步驟,用以重新取得一預辨識影像。 In some embodiments of the present invention, the color system conversion step further includes performing a step of reacquiring a pre-recognized image to re-acquire a pre-recognized image.

在本發明的一些實施例中,其中,該色系轉換步驟另設有一範圍閾值,該範圍閾值為0.6~0.9。 In some embodiments of the present invention, wherein the color system conversion step is additionally provided with a range threshold, and the range threshold is 0.6 to 0.9.

在本發明的一些實施例中,其中,該區域選取步驟係採用二元搜尋法,圈選取出一圓形興趣影像區塊。 In some embodiments of the present invention, the region selection step adopts a binary search method to circle and select a circular image block of interest.

在本發明的一些實施例中,其中,該結晶狀態分類步驟係採用ResNet(Residual Neural Network)學習模型進行訓練。 In some embodiments of the present invention, the crystallization state classification step is trained by using a ResNet (Residual Neural Network) learning model.

在本發明的一些實施例中,其中,該排卵狀態判斷步驟另設有一機率閾值,該機率閾值為0.5~0.9。 In some embodiments of the present invention, wherein the ovulation state determination step is additionally provided with a probability threshold, the probability threshold is 0.5 to 0.9.

在本發明的一些實施例中,其中,於該區域選取步驟之後並於執行該結晶狀態分類步驟之前,另執行一影像分割步驟,將該興趣影像區塊進行影像分割,取得數分割影像,以提升辨識效率。 In some embodiments of the present invention, after the region selection step and before the crystalline state classification step, another image segmentation step is performed to perform image segmentation on the image block of interest to obtain a number of segmented images. Improve recognition efficiency.

在本發明的一些實施例中,其中,該影像分割步驟係以十字分割法將該興趣影像區塊分割成四個子影像區塊。 In some embodiments of the present invention, wherein the image division step is to divide the image block of interest into four sub-image blocks by a cross division method.

在本發明的一些實施例中,其中,該排卵狀態判定步驟另設有一數量閾值。 In some embodiments of the present invention, wherein the ovulation state determination step is additionally provided with a number threshold.

在本發明的一些實施例中,其中,該數量閾值為1~3。 In some embodiments of the present invention, the number threshold is 1~3.

在本發明的一些實施例中,其中,於該區域選取步驟之後並於執行該結晶狀態分類步驟之前,另執行一影像壓縮步驟,將該興趣影像區塊進行影像壓縮,以提升辨識效率。 In some embodiments of the present invention, after the region selection step and before the crystalline state classification step, another image compression step is performed to compress the image block of interest to improve the recognition efficiency.

在本發明的一些實施例中,其中,該結晶狀態分類步驟另包含執行一資料擴增步驟,用以獲得擁有更多相同特徵的影像資料,以提升辨識正確率。 In some embodiments of the present invention, the crystallization state classification step further includes performing a data amplification step to obtain more image data with the same characteristics to improve the recognition accuracy.

S1:影像擷取步驟 S1: Image capture step

S2:色系轉換步驟 S2: Color system conversion steps

S3:顏色偵測步驟 S3: Color detection step

S4:區域選取步驟 S4: Region selection steps

S41:影像分割步驟 S41: Image segmentation step

S42:影像壓縮步驟 S42: Image compression step

S5:結晶狀態分類步驟 S5: Steps to classify crystalline state

S50:資料擴增步驟 S50: Data amplification step

S6:排卵狀態辨識步驟 S6: Steps to identify ovulation status

ρ:範圍閾值 ρ : range threshold

θ:機率閾值 θ : probability threshold

λ:數量閾值 λ : number threshold

μ:結晶機率 μ : crystallization probability

γ:排卵期預測機率 γ : Prediction probability of ovulation period

ε:誤差值 ε: error value

R:效能閾值 R: Effectiveness threshold

圖1為本發明之一種基於唾液結晶的排卵預測方法之一實施例流程圖;圖2為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖;圖3為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖;圖4為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖;圖5為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖;圖6-1為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像;圖6-2為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV黑色轉換圖;圖6-3為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV白色轉換圖;圖6-4為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV紅色轉換圖;圖6-5為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV綠色轉換圖;圖6-6為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV藍色轉換圖; 圖7-1為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像;圖7-2為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV黑色轉換圖;圖7-3為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV白色轉換圖;圖7-4為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV紅色轉換圖;圖7-5為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV綠色轉換圖;圖7-6為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV藍色轉換圖;圖8為本發明之一種基於唾液結晶的排卵預測方法之一不具羊齒狀唾液結晶影像;圖9為本發明之一種基於唾液結晶的排卵預測方法之一具有羊齒狀唾液結晶影像;圖10為本發明之一種基於唾液結晶的排卵預測方法之排卵狀態辨識流程圖;圖11為本發明之一種基於唾液結晶的排卵預測方法之一資料訓練流程暨唾液結晶分類器產生圖。 Fig. 1 is a flowchart of an embodiment of a method for predicting ovulation based on saliva crystallization; Fig. 2 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystallization; Fig. 3 is a kind of one of the present invention A flowchart of another embodiment of a method for predicting ovulation based on saliva crystallization; Figure 4 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystallization; Figure 5 is a flowchart of another embodiment of ovulation prediction based on saliva crystallization A flowchart of another embodiment of the method; Figure 6-1 is a non-saliva crystallization image of a saliva crystallization-based ovulation prediction method of the present invention; Figure 6-2 is one of the saliva crystallization-based ovulation prediction methods of the present invention The HSV black conversion diagram of the non-saliva crystal image; Figure 6-3 is the white conversion diagram of the non-saliva crystal image HSV which is one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 6-4 is a saliva crystal-based ovulation of the present invention One of the prediction methods is a non-saliva crystallization image HSV red conversion diagram; Figure 6-5 is a non-saliva crystallization image HSV green conversion diagram of a saliva crystallization-based ovulation prediction method of the present invention; Figure 6-6 is a kind of based on the present invention One of the saliva crystallization prediction methods for ovulation, the HSV blue transition image of non-saliva crystallization images; Fig. 7-1 is a saliva crystal image, one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 7-2 is a saliva crystal image HSV black conversion diagram, one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 7 -3 is a saliva crystal image HSV white conversion diagram of one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 7-4 is a saliva crystal image HSV red conversion diagram of one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 7-5 is a green conversion diagram of saliva crystal image HSV, one of the saliva crystal-based ovulation prediction methods of the present invention; Fig. 7-6 is a saliva crystal image HSV blue color, one of the saliva crystal-based ovulation prediction methods of the present invention Conversion diagram; Figure 8 is a saliva crystal-based ovulation prediction method without fern-shaped saliva crystal images; Figure 9 is a saliva crystal-based ovulation prediction method with fern-shaped saliva crystal images Fig. 10 is a flow chart of ovulation status identification of a saliva crystal-based ovulation prediction method of the present invention; Fig. 11 is a data training process and a saliva crystal classifier generation diagram of a data training process of a saliva crystal-based ovulation prediction method of the present invention.

圖1為本發明之一種基於唾液結晶的排卵預測方法之一實施例流程圖,請參考圖1。本發明之一種基於唾液結晶的排卵預測方法包含:一影像擷 取步驟S1、一色系轉換步驟S2、一顏色偵測步驟S3、一區域選取步驟S4、一影像分割步驟S5、一結晶分類步驟S6及一排卵狀態辨識步驟S7。該影像擷取步驟S1,取得一預辨識影像,該影像擷取步驟S1可以透過任何的攝像裝置實施之,例如例智慧手機上的相機再加上一顯微鏡頭,將唾液塗抹在一玻片上後經由使用者將鏡頭對準該玻片進行拍攝取得該預辨識影像。 FIG. 1 is a flowchart of an embodiment of a method for predicting ovulation based on saliva crystallization according to the present invention. Please refer to FIG. 1. An ovulation prediction method based on saliva crystals of the present invention includes: an image capture Take step S1, a color system conversion step S2, a color detection step S3, a region selection step S4, an image segmentation step S5, a crystal classification step S6, and an ovulation state identification step S7. The image capturing step S1 is to obtain a pre-identified image. The image capturing step S1 can be implemented by any camera device, such as a camera on a smart phone plus a microscope lens, after applying saliva on a glass slide The pre-identified image is obtained by the user pointing the lens at the glass slide to shoot.

該色系轉換步驟S2,將該預辨識影像轉換成一轉換影像,用以降低辨識誤差,方便後續的影像辨識程序,該轉換影像的轉換有助於後續的影像數位化處理,此處所述之色系轉換係利用色彩學常用之方法,即RGB色彩模型(色彩三原色Red,Green,Blue)與HSV顏色空間模型(Hue,Saturation,Value)之轉換。 The color system conversion step S2 converts the pre-recognized image into a converted image to reduce recognition errors and facilitate subsequent image recognition procedures. The conversion of the converted image facilitates subsequent image digitization processing. The color system conversion system uses a common method in color science, namely, the conversion between the RGB color model (the three primary colors of Red, Green, and Blue) and the HSV color space model (Hue, Saturation, Value).

一般一張RGB色彩模型表示的影像,用三個數值來描述同一圖元,在24位元影像中,每個元素會以0到255之間的數字表示。而HSV(Hue,Saturation,Value)顏色空間的模型對應於圓柱坐標系中的一個圓錐形子集,圓錐的頂面對應於V=1,它包含RGB色彩模型中的R=1,G=1,B=1三個面,所代表的顏色較亮。一般常用方法當把RGB圖像向HSV顏色空間轉變的時候,H通道的值範圍介於0~180之間,S通道的值範圍介於0~255之間,V通道的值範圍介於0~255之間,由RGB轉化到HSV的轉換公式如下:

Figure 108114662-A0305-02-0008-1
Generally, an image represented by an RGB color model uses three values to describe the same pixel. In a 24-bit image, each element is represented by a number between 0 and 255. The HSV (Hue, Saturation, Value) color space model corresponds to a cone-shaped subset in the cylindrical coordinate system. The top surface of the cone corresponds to V=1, which contains R=1 and G=1 in the RGB color model. , B=1 three faces, the colors represented are brighter. Generally, when converting RGB image to HSV color space, the value range of H channel is between 0~180, the value range of S channel is between 0~255, and the value range of V channel is between 0 Between ~255, the conversion formula from RGB to HSV is as follows:
Figure 108114662-A0305-02-0008-1

v=max v = max

上述公式中,h=H通道的值,s=S通道的值,v=V通道的值,r=RGB中紅色的值,g=RGB中綠色的值,b=RGB中藍色的值,表1為常見的HSV基本颜色分量範圍,上述之轉換方法為一般影像處理的基本技巧,於此不再贅述。 In the above formula, h = the value of the H channel, s = the value of the S channel, v = the value of the V channel, r = the value of red in RGB, g = the value of green in RGB, b = the value of blue in RGB, Table 1 shows the range of common HSV basic color components. The above-mentioned conversion method is the basic technique of general image processing, and will not be repeated here.

Figure 108114662-A0305-02-0009-2
Figure 108114662-A0305-02-0009-2

在本實施例中,該色系轉換步驟S2所採用之的HSV顏色分量上限(max)及下限(min)範圍如下表2所示:

Figure 108114662-A0305-02-0009-3
In this embodiment, the HSV color component upper limit (max) and lower limit (min) ranges used in the color system conversion step S2 are shown in Table 2 below:
Figure 108114662-A0305-02-0009-3

本實施例中,該色系轉換步驟S2透過HSV顏色轉換將該預辨識影像進行五種顏色轉換,分別為黑、白、紅、綠及藍等五種顏色,進而得到一轉換影像,該轉換影像中只包含上述黑、白、紅、綠及藍等五種顏色分量,該轉換影像有利於該預辨識影像是否合格之判斷及後續排卵狀態辨識,當然可以依照需求進行其他顏色及顏色數的轉換,本發明並不限制。 In this embodiment, the color system conversion step S2 performs five color conversions on the pre-identified image through HSV color conversion, which are five colors of black, white, red, green, and blue, to obtain a converted image. The image only contains the above five color components of black, white, red, green and blue. The converted image is beneficial to the judgment of the pre-recognition image and the subsequent ovulation status identification. Of course, other colors and color numbers can be performed according to needs. Conversion, the present invention is not limited.

接著進行一顏色偵測步驟S3,該顏色偵測步驟S3係透過設定偵測 黑色及綠色,本實施例中,利用判斷該轉換影像中的黑色或綠色之分布覆蓋範圍是否為最大或次大來進行影像篩選,以確保該預辨識影像為一合格之影像,所謂合格是指確實為唾液影像。本實施例中,先判斷該轉換影像中最大覆蓋範圍的顏色是否為黑色或綠色之一種,若否,則表示該預辨識影像為非合格之影像,即非唾液影像,須重新拍攝取得新影像,即重新執行影像擷取步驟S1,若是,則繼續判斷次大覆蓋範圍的顏色是否為黑色或綠色之其中一種,若否,則表示該預辨識影像為非合格之影像,須重新拍攝取得新影像,即重新執行影像擷取步驟S1,若是,則進行一區域選取步驟S4。前述該轉換影像中偵測顏色之選定可依實際需求而定,本發明不加以限制。 Then proceed to a color detection step S3, the color detection step S3 is to detect by setting Black and green. In this embodiment, it is used to determine whether the black or green distribution coverage in the converted image is the largest or the second largest to perform image screening to ensure that the pre-identified image is a qualified image. It is indeed an image of saliva. In this embodiment, it is first judged whether the color of the largest coverage area in the converted image is black or green. If not, it means that the pre-identified image is a non-qualified image, that is, a non-saliva image, and a new image must be taken again. , That is, re-execute the image capturing step S1, if yes, continue to determine whether the color of the second largest coverage area is one of black or green, if not, it means that the pre-identified image is a non-qualified image and must be re-shot to obtain a new Image, that is, re-execute the image capturing step S1, if yes, proceed to a region selection step S4. The selection of the detected color in the aforementioned converted image can be determined according to actual requirements, and the present invention is not limited.

在影像處理技術中,影像的特定範圍稱為感興趣的區域(Regions Of Interest)或是ROIs,這方面的處理稱為ROI處理(ROI processing)。本實施例中,在進行該區域選取步驟S4時,係利用一ROIs處理模組以二元搜尋法對該轉換影像進行影像邊緣偵測,取得該轉換影像中一唾液結晶區域,並以畫圓方式圈選出該唾液結晶區域範圍形成一圓形影像區塊,透過該區域選取步驟S4圈選出來的特定影像區域範圍將有利於後續進行辨識,亦即只針對有興趣的特定區域進行辨識,即只需辨識該圓形影像區塊,而不需要去辨識圓形影像區塊以外的範圍,因為排卵狀態是看唾液結晶的形狀而判斷的。目前有許多邊緣偵測的方法,例如,Otsu演算法、Sobel邊緣偵測和Hough圓形偵測等,在本實例中係以二元搜尋法為之,但本發明並不加以限制。 In image processing technology, the specific area of the image is called Regions Of Interest or ROIs, and this aspect of processing is called ROI processing. In this embodiment, when the region selection step S4 is performed, an ROIs processing module is used to perform image edge detection on the converted image by a binary search method to obtain a saliva crystallized region in the converted image and draw a circle The saliva crystallized area is circled to form a circular image block. The specific image area circled in step S4 through the area selection step S4 will facilitate subsequent identification, that is, only identify the specific area of interest, that is, Only the circular image block needs to be identified, and there is no need to identify the area outside the circular image block, because the ovulation state is judged by the shape of the saliva crystals. There are many edge detection methods, such as Otsu algorithm, Sobel edge detection, and Hough circle detection. In this example, a binary search method is used, but the invention is not limited.

在該區域選取步驟S4結束後進行一結晶狀態分類步驟S5,將前述步驟中所得之該圓形興趣影像區塊進行結晶狀態分類,此處所使用的分類方法係基於類神經網路模型來進行學習訓練,例如:VGG、Inception、ResNet(Residual Neural Network)...等模型,此為一般熟知之類神經網路模型,在此不再詳述。 After the region selection step S4 is completed, a crystallization state classification step S5 is performed to classify the crystalline state of the circular image block of interest obtained in the foregoing steps. The classification method used here is based on a neural network model for learning Training, such as: VGG, Inception, ResNet (Residual Neural Network)... and other models, this is a well-known neural network model, and will not be detailed here.

本實施例中使用ResNet深度學習模型作為本發明之影像辨識訓練模型。在該結晶狀態分類步驟S5中,係預先利用影像辨識訓練模型所得之一唾液結晶分類器,藉由該唾液結晶分類器來進行排卵結晶與非排卵結晶狀態之影像分類,該唾液結晶分類器將該圓形興趣影像進行排卵結晶與非排卵結晶的分類,以利後續進行排卵期與非排卵期狀態的判定,若被分類為非排卵結晶,則該興趣影像區塊分類設為”0”,若被分類為排卵結晶,則該興趣影像區塊分類設為”1”,接著進行一排卵狀態判斷步驟S6。 In this embodiment, the ResNet deep learning model is used as the image recognition training model of the present invention. In the crystallization state classification step S5, a saliva crystal classifier obtained from the image recognition training model is used in advance, and the saliva crystal classifier is used to classify images of ovulatory crystal and non-ovulatory crystal state, and the saliva crystal classifier will The circular interest image is classified into ovulation crystals and non-ovulatory crystals to facilitate the subsequent determination of ovulation and non-ovulation phases. If it is classified as non-ovulatory crystals, the classification of the interest image block is set to "0", If it is classified as an ovulation crystal, the classification of the image block of interest is set to "1", and then an ovulation state determination step S6 is performed.

當該結晶狀態分類步驟S5進行分類後,將該興趣影像區塊之分類結果經由該排卵狀態判斷步驟S6,將排卵狀態判斷結果顯示告之使用者為排卵期狀態或非排卵期狀態,以供使用者參考。透過上述方法,可以提供一種更有效的排卵期判斷方法。 After the crystallization state classification step S5 is performed, the classification result of the interesting image block is passed through the ovulation state judgment step S6, and the ovulation state judgment result is displayed to inform the user whether it is an ovulation state or a non-ovulation state for User reference. Through the above method, a more effective method for judging the ovulation period can be provided.

請續參考圖1。較佳地,在該顏色偵測步驟S3中另設有一範圍閾值ρ,該範圍閾值ρ較佳係介於0.6~0.9,用以提高合格影像的辨識精確度,本實施例中,該範圍閾值ρ=0.7,在執行該顏色偵測步驟S3時,分別計算黑、白、紅、綠及藍等五種顏色各自於整張影像中的覆蓋率,並計算計算最大及次大的顏色覆蓋率是否為黑色或綠色,若否,則重新執行該影像擷取步驟S1,若是,則接著將黑色及綠色的覆蓋率相加,並計算兩者的覆蓋率之和與全體顏色覆蓋率之和的比值是否大於等於0.7,若否,則重新執行該影像擷取步驟S1,若是,則接著進行該區域選取步驟S4。其中,本實施例述之範圍閾值ρ可依實際需求而設定其值,本發明並不加以限制。 Please continue to refer to Figure 1. Preferably, a range threshold ρ is additionally provided in the color detection step S3, and the range threshold ρ is preferably between 0.6 and 0.9 to improve the recognition accuracy of qualified images. In this embodiment, the range threshold ρ = 0.7. When performing the color detection step S3, calculate the coverage rates of the five colors of black, white, red, green and blue in the entire image respectively, and calculate the largest and second largest color coverage rates Whether it is black or green, if not, re-execute the image capturing step S1, if yes, then add the coverage of black and green, and calculate the sum of the coverage of both and the sum of the coverage of all colors Whether the ratio is greater than or equal to 0.7, if not, re-execute the image capturing step S1, if yes, then proceed to the region selection step S4. Wherein, the range threshold ρ described in this embodiment can be set according to actual requirements, and the present invention is not limited.

請續參考圖1。在該結晶狀態分類步驟S5中,主要是透過類神經網 路的學習模行對唾液結晶影像進行初步分類,而在執行該排卵狀態判斷步驟S6中,為了增加排卵狀態判斷的精確度,另設有一機率閾值θ,透過該機率閾值θ來進行最終的排卵狀態判定的依據,其中該機率閾值θ較佳設為0.5~0.9,本實施例中該機率閾值θ為0.8,即當該圓形興趣影像的排卵狀態機率經過類神經網路訓練模型學習後判定大於或等於0.8時,則最終判斷該預辨識影像屬於排卵期,反之則否,即最終判斷該預辨識影像屬於非排卵期。 Please continue to refer to Figure 1. In the crystallization state classification step S5, the saliva crystallization image is primarily classified through the neural network-like learning model. In the ovulation state determination step S6, in order to increase the accuracy of the ovulation state determination, another set there is a probability threshold value [theta], is performed based on the final ovulation state determination through the probability threshold value [theta], wherein the probability threshold value [theta] is preferably 0.5 to 0.9, in this embodiment the probability threshold value [theta] according to the present embodiment is 0.8, i.e., when the circular interest When the probability of the ovulation state of the image is determined to be greater than or equal to 0.8 after learning by a neural network training model, it is finally determined that the pre-identified image belongs to the ovulation period, otherwise, it is not, that is, it is finally judged that the pre-identified image belongs to the non-ovulatory period.

圖2為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖,請參考圖2。較佳地,於該區域選取步驟S4之後並於執行該結晶狀態分類步驟S5之前,另執行一影像分割步驟S41,將該興趣影像區塊進行影像分割,取得數分割影像,影像分割後可以放大影像特徵資料,達到提升辨識效率及辨識精準度,在本實施例中,係以十字分割法將該興趣影像區塊分割成四個子影像區塊,分別為一第一子影像區塊、一第二子影像區塊、一第三子影像區塊及一第四子影像區塊,每個子影像區塊尺寸為500×500,其中,子影像區塊尺寸可依實際需求而設定其值,本發明並不加以限制。 2 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystals according to the present invention, please refer to FIG. 2. Preferably, after the region selection step S4 and before the crystalline state classification step S5 is performed, another image segmentation step S41 is performed to perform image segmentation on the image block of interest to obtain multiple segmented images, which can be enlarged after segmentation The image feature data can improve the recognition efficiency and recognition accuracy. In this embodiment, the image block of interest is divided into four sub-image blocks by the cross division method, which are a first sub-image block and a second sub-image block. Two sub-image blocks, a third sub-image block, and a fourth sub-image block. Each sub-image block has a size of 500×500. The size of the sub-image block can be set according to actual needs. The invention is not limited.

請續參考圖2。較佳地,在該排卵狀態判斷步驟S6中另設一數量閾值λ,在本實施例中,由於該興趣影像區塊分割成四個子影像區塊,因此,將該數量閾值λ設為1~3,其中該數量閾值λ為整數,可以依據需求(如影像分割數量)設定該數量閾值λ,因此當執行該結晶狀態分類步驟S5分類後,該第一子影像區塊、該第二子影像區塊、該第三子影像區塊及該第四子影像區塊會被依序進行結晶狀態分類,各自分別被分類為”1”或”0”,接著再執行該排卵狀態判斷步驟S6時,可以利用該機率閾值θ及該數量閾值λ來進行更有效率及精準的排卵狀態判定。 Please continue to refer to Figure 2. Preferably, another number threshold λ is set in the ovulation state determination step S6. In this embodiment, since the image block of interest is divided into four sub-image blocks, the number threshold λ is set to 1~ 3, wherein the threshold number is an integer of [lambda], can be based on needs (such as the number of division images) sets the threshold number of [lambda], so when performing the classification step S5 classified crystalline state, the first sub-image block, the second sub-image The block, the third sub-image block, and the fourth sub-image block will be sequentially classified into the crystalline state, each being classified as "1" or "0", and then the ovulation state determination step S6 is executed , The probability threshold θ and the quantity threshold λ can be used for more efficient and accurate ovulation status determination.

圖10為本發明之一種基於唾液結晶的排卵預測方法之排卵狀態 辨識流程圖,請同時參考圖10。續上所述,在一實施例中,該排卵狀態判斷步驟S6執行時,當該機率閾值θ=0.8,該數量閾值λ設為1時,亦即該四個子影像區塊中有一個子影像區塊的結晶狀態分類為”1”時,且其結晶機率μ大於或等於0.8,則判斷該預辨識影像屬於排卵期;當機率閾值θ=0.7,該數量閾值λ設為2時,亦即該四個子影像區塊中有二個子影像區塊的結晶狀態分類為”1”時,雖其結晶機率μ小於0.8但均大於或等於0.7,則亦判斷該預辨識影像屬於排卵期;當機率閾值θ=0.6,該數量閾值λ設為3時,亦即該四個子影像區塊中有三個子影像區塊的結晶狀態分類為”1”時,雖其結晶機率μ小於0.7但均大於或等於0.6,則亦判斷該預辨識影像屬於排卵期,其中,上述各情況之該結晶機率μ為一子影像區塊的結晶狀態被分類為”1”時所計算出的機率。反之,若不符合上述驗證方法,則判斷該預辨識影像屬於非排卵期。其中,本實施例所述之該機率閾值θ及該數量閾值λ,可依實際需求而設定其值,本發明並不加以限制。 FIG. 10 is a flowchart of ovulation status identification of a saliva crystal-based ovulation prediction method of the present invention. Please also refer to FIG. 10. As described above, in one embodiment, when the ovulation state determination step S6 is performed, when the probability threshold θ = 0.8 and the number threshold λ is set to 1, that is, there is one sub image in the four sub image blocks When the crystallization state of the block is classified as "1" and its crystallization probability μ is greater than or equal to 0.8, it is judged that the pre-identified image belongs to the ovulation period; when the probability threshold θ = 0.7 and the number threshold λ is set to 2, that is When the crystallization state of two of the four sub-image blocks is classified as "1", although the crystallization probability μ is less than 0.8 but both are greater than or equal to 0.7, it is also judged that the pre-identified image belongs to the ovulation period; Threshold θ = 0.6, when the number threshold λ is set to 3, that is, when the crystallization state of three of the four sub-image blocks is classified as "1", although the crystallization probability μ is less than 0.7 but all are greater than or equal to 0.6, it is also judged that the pre-identified image belongs to the ovulation period, where the crystallization probability μ in each of the above situations is the probability calculated when the crystallization state of a sub-image block is classified as "1". Conversely, if the above verification method is not met, it is determined that the pre-identified image belongs to the non-ovulatory period. Wherein, the probability threshold θ and the quantity threshold λ described in this embodiment can be set according to actual requirements, and the present invention is not limited.

續上所述,本實施例中,當四個子影像都被進行結晶分類完成結束後,若被判定為屬於排卵期狀態時,計算出一排卵期預測機率γ供使用者參考,其中該排卵期預測機率γ計算公式如下:

Figure 108114662-A0305-02-0013-4
其中,μ k
Figure 108114662-A0305-02-0013-8
{μ|μ
Figure 108114662-A0305-02-0013-9
θ},
Figure 108114662-A0305-02-0013-10
μ k :0
Figure 108114662-A0305-02-0013-11
μ k
Figure 108114662-A0305-02-0013-12
1,n=|{μ}|,1
Figure 108114662-A0305-02-0013-13
n
Figure 108114662-A0305-02-0013-14
4,0.001
Figure 108114662-A0305-02-0013-15
ε
Figure 108114662-A0305-02-0013-16
0.025,其中ε為一誤差值,該誤差值ε介於一誤差值範圍之間,可以實際需求調整設定誤差值範圍並給定該誤差值ε一設定值。 As mentioned above, in this embodiment, after the four sub-images are all crystalline and classified, if it is judged to belong to the ovulation state, an ovulation prediction probability γ is calculated for the user's reference, and the ovulation period The prediction probability γ is calculated as follows:
Figure 108114662-A0305-02-0013-4
Among them, μ k
Figure 108114662-A0305-02-0013-8
{ μ | μ
Figure 108114662-A0305-02-0013-9
θ },
Figure 108114662-A0305-02-0013-10
μ k :0
Figure 108114662-A0305-02-0013-11
μ k
Figure 108114662-A0305-02-0013-12
1, n =|{ μ }|, 1
Figure 108114662-A0305-02-0013-13
n
Figure 108114662-A0305-02-0013-14
4, 0.001
Figure 108114662-A0305-02-0013-15
ε
Figure 108114662-A0305-02-0013-16
0.025, where ε is an error value, and the error value ε is between an error value range. The error value range can be adjusted according to actual requirements and the error value ε is given a set value.

例如,當該機率閾值θ=0.8,該數量閾值λ設為1,該誤差值ε=0.001,假設其中一個子影像區塊之該結晶機率μ=0.85,且n=1,即μ 1=0.85,則

Figure 108114662-A0305-02-0013-5
,即表示排卵期的機率為80.25%。 For example, when the probability threshold θ = 0.8, the number threshold λ is set to 1, the error value ε = 0.001, assuming that the crystallization probability of one of the sub image blocks is μ = 0.85 and n =1, that is, μ 1 = 0.85 ,then
Figure 108114662-A0305-02-0013-5
, Which means that the probability of ovulation is 80.25%.

又例如,當該機率閾值θ=0.7,該數量閾值λ設為2,該誤差值ε=0.001,假設其中兩個子影像區塊之該結晶機率μ分別為0.72及0.76,且n=2,即μ 1=0.72,μ 2=0.76,則

Figure 108114662-A0305-02-0014-7
,即表示排卵期的機率為71% For another example, when the probability threshold θ = 0.7, the number threshold λ is set to 2, the error value ε = 0.001, assuming that the crystallization probability μ of two sub-image blocks are 0.72 and 0.76 respectively, and n = 2, That is, μ 1 =0.72, μ 2 =0.76, then
Figure 108114662-A0305-02-0014-7
, Which means the probability of ovulation is 71%

圖3為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖,請參考圖3。較佳地,於該區域選取步驟S4之後並於執行該結晶狀態分類步驟S5之前,另執行一影像壓縮步驟S42,將該興趣影像區塊進行影像壓縮,以提升辨識效率。因為在深度學習模型進行預測時,通常會將影像壓縮成該模型辨識效果最佳的尺寸,例如,GoogLeNet最佳影像尺寸為224×224、Inception V3最佳影像尺寸為299×299、YOLO v3最佳影像尺寸為416×416,本實施例係使用最佳尺寸224×224,因此,在執行該結晶狀態分類步驟S5之前,先執行該影像壓縮步驟S42提供結晶分類器輸入影像的最佳尺寸,將有助於後續進行影像分類。當然,亦可於執行該影像分割步驟S41後,再執行該該影像壓縮步驟S42,以增加分類及整體辨識效率,其中,子影像壓縮尺寸可依實際需求而設定其值,本發明並不加以限制。 FIG. 3 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystallization according to the present invention. Please refer to FIG. 3. Preferably, after the region selection step S4 and before the crystalline state classification step S5 is performed, another image compression step S42 is performed to perform image compression on the image block of interest to improve the recognition efficiency. Because when the deep learning model makes predictions, the image is usually compressed to the size with the best recognition effect of the model. For example, the best image size of GoogLeNet is 224×224, the best image size of Inception V3 is 299×299, and the best image size of YOLO v3 The best image size is 416×416. This embodiment uses the best size 224×224. Therefore, before performing the crystalline state classification step S5, perform the image compression step S42 to provide the best size of the input image of the crystalline classifier. It will be helpful for subsequent image classification. Of course, the image compression step S42 can also be executed after the image segmentation step S41 is executed to increase the classification and overall identification efficiency. Among them, the sub-image compression size can be set according to actual needs. The present invention does not limit.

圖4為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖,請參考圖4。較佳地,當執行該影像分割步驟S41後再執行該影像壓縮步驟S42,將得到更佳的影像結果,更有利於在辨識過程中的效率。 4 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystals according to the present invention, please refer to FIG. 4. Preferably, when the image segmentation step S41 is executed and then the image compression step S42 is executed, a better image result will be obtained, which is more conducive to the efficiency in the recognition process.

圖5為本發明之一種基於唾液結晶的排卵預測方法之另一實施例流程圖,請參考圖5。較佳地,在進入神經網路模型訓練前,可針對影像資料庫進行資料擴增,即預先輸入更多的影像資料,讓神經網路更易於找到可以區分的特徵,主要在於可以避免因為資料過少,導致無法區分重要特徵的情況,而導致 誤判,即若影像特徵無法明顯區分,很容易將不同但類似的狀況判斷為同一狀況,透過該資料擴增步驟S50可以使得在執行該結晶狀態分類步驟S5時,使該興趣影像進行排卵與非排卵狀態的初步分類更為精準。 FIG. 5 is a flowchart of another embodiment of a method for predicting ovulation based on saliva crystallization according to the present invention. Please refer to FIG. 5. Preferably, before entering the neural network model training, data amplification can be performed on the image database, that is, more image data can be input in advance to make it easier for the neural network to find distinguishable features, mainly because it can avoid data Too little, resulting in situations where it is impossible to distinguish important features, resulting in Misjudgment, that is, if the image features cannot be clearly distinguished, it is easy to judge different but similar conditions as the same condition. Through the data amplification step S50, the crystallization state classification step S5 can be executed to make the interest image perform ovulation and non-ovulation. The preliminary classification of ovulation status is more accurate.

圖6-1~圖6-6為本發明之一種基於唾液結晶的排卵預測方法之一非唾液結晶影像HSV色系轉換圖,請參考圖6-1~圖6-6。在本發明之一實施例中,其中,圖6-1為一風景圖像,在經過HSV色系轉換後,分別得到圖6-2黑色轉換圖,其黑色分布覆蓋率為16532.5,圖6-3白色轉換圖,其白色分布覆蓋率為42088.5,圖6-4紅色轉換圖,其紅色分布覆蓋率為57323.5,圖6-5綠色轉換圖,其綠色分布覆蓋率為174848.5,圖6-6藍色轉換圖,其藍色分布覆蓋率為3739.5。由圖6-2~圖6-6得知,最大的覆蓋範圍之顏色為綠色,次大的覆蓋範圍之顏色為紅色,因此,在執行該顏色偵測步驟S3時,則判斷該預辨識影像為非合格之影像,須重新拍攝取得新影像,即重新執行影像擷取步驟S1。 Figures 6-1 to 6-6 are the HSV color conversion diagrams of non-saliva crystallization images, one of the saliva crystallization-based ovulation prediction methods of the present invention, please refer to Figures 6-1 to 6-6. In an embodiment of the present invention, Figure 6-1 is a landscape image. After HSV color system conversion, the black conversion map of Figure 6-2 is obtained, and the black distribution coverage rate is 16532.5, Figure 6 3 White conversion map, its white distribution coverage rate is 42088.5, Figure 6-4 red conversion map, its red distribution coverage rate is 57323.5, Figure 6-5 green conversion map, its green distribution coverage rate is 174848.5, Figure 6-6 blue The color conversion map has a blue coverage rate of 3739.5. It can be seen from Figures 6-2 to 6-6 that the color of the largest coverage area is green, and the color of the second largest coverage area is red. Therefore, when the color detection step S3 is performed, the pre-identified image is determined If it is a non-qualified image, a new image must be captured again, that is, the image capturing step S1 is executed again.

圖7-1~圖7-6為本發明之一種基於唾液結晶的排卵預測方法之一唾液結晶影像HSV色系轉換圖,請參考圖7-1~圖7-6。在本發明之一實施例中,其中,圖7-1為一唾液結晶圖像,在經過HSV色系轉換後,分別得到圖7-2黑色轉換圖,其黑色分布覆蓋率為5788509.5,圖7-3白色轉換圖,其白色分布覆蓋率為0,圖7-4紅色轉換圖,其紅色分布覆蓋率為4293821.0,圖7-5綠色轉換圖,其綠色分布覆蓋率為10322792.5,圖7-6藍色轉換圖,其藍色分布覆蓋率為0。由圖7-2~圖7-6得知,最大的覆蓋範圍之顏色為綠色,其分布覆蓋率為10322792.5,次大的覆蓋範圍之顏色為黑色,其分布覆蓋率為5788509.5,因此,在執行該顏色偵測步驟S3時,則判斷該預辨識影像為合格之影像,接著執行該區域選取步驟S4,用以取得一興趣影像區塊。 Figures 7-1~Figure 7-6 are the HSV color conversion diagrams of saliva crystal images, one of the saliva crystal-based ovulation prediction methods of the present invention, please refer to Figure 7-1~Figure 7-6. In an embodiment of the present invention, Figure 7-1 is a saliva crystal image. After HSV color system conversion, the black conversion map of Figure 7-2 is obtained, and the black distribution coverage rate is 5788509.5, Figure 7 -3 White conversion map, its white distribution coverage rate is 0, Figure 7-4 red conversion map, its red distribution coverage rate is 4293821.0, Figure 7-5 green conversion map, its green distribution coverage rate is 10322792.5, Figure 7-6 The blue conversion graph has a blue distribution coverage rate of 0. From Figure 7-2~Figure 7-6, the color of the largest coverage area is green, and its distribution coverage rate is 10322792.5, and the color of the second largest coverage area is black, and its distribution coverage rate is 5788509.5. Therefore, in the implementation In the color detection step S3, it is determined that the pre-identified image is a qualified image, and then the region selection step S4 is executed to obtain an image block of interest.

請續參考圖7-1~圖7-6。在前述一些實施例中,較佳地,在執行該顏色偵測步驟S3時設有一範圍閾值ρ,以確保合格影像之判斷能更為精確,設該圍閾值ρ=0.7,該轉換影像中黑色分布覆蓋率與綠色分布覆蓋率的和佔全部顏色的比例為(5788509.5+10322792.5)/20405123.0

Figure 108114662-A0305-02-0016-17
0.78957,0.78957大於該圍閾值ρ,因此判斷該預辨識影像為合格之影像,接著執行該區域選取步驟S4,當然該範圍閾值ρ可依照當下需求調整。 Please continue to refer to Figure 7-1~Figure 7-6. In some of the foregoing embodiments, preferably, a range threshold ρ is set when performing the color detection step S3 to ensure that the judgment of qualified images can be more accurate. Set the range threshold ρ = 0.7, and the converted image is black The ratio of the distribution coverage rate and the green distribution coverage rate to the total color is (5788509.5+10322792.5)/20405123.0
Figure 108114662-A0305-02-0016-17
0.78957, 0.78957 is greater than the surrounding threshold ρ, so it is determined that the pre-identified image is a qualified image, and then the region selection step S4 is performed. Of course, the range threshold ρ can be adjusted according to current needs.

圖8為本發明之一種基於唾液結晶的排卵預測方法之不具羊齒狀唾液結晶影像,請參考圖8。一般情況下排卵期之唾液會有羊齒狀結晶形狀,非排卵期則無,其中,圖8(a)為一尚未執行該區域選取步驟S4之轉換影像,圖8(b)為一執行該區域選取步驟S4之轉換影像,即圖8(b)圈選範圍處為一興趣影像區塊。 FIG. 8 is an image of saliva crystals without fern-shaped saliva in a saliva crystal-based ovulation prediction method of the present invention. Please refer to FIG. 8. Under normal circumstances, saliva in the ovulation period will have a fern-like crystal shape, but not in the non-ovulation period. Figure 8(a) is a converted image of the region selection step S4 that has not yet been performed, and Figure 8(b) is an implementation of this The converted image in the area selection step S4, that is, the circled area in FIG. 8(b) is an image block of interest.

圖9為本發明之一種基於唾液結晶的排卵預測方法之具有羊齒狀唾液結晶影像,請參考圖9。其中,圖9(a)為一尚未執行該區域選取步驟S4之轉換影像,圖9(b)為一執行該區域選取步驟S4之轉換影像,即圖9(b)圈選範圍處為一興趣影像區塊。 FIG. 9 is an image of a fern-shaped saliva crystal with a saliva crystal-based ovulation prediction method of the present invention. Please refer to FIG. 9. Among them, Figure 9(a) is a converted image that has not yet performed the region selection step S4, and Figure 9(b) is a converted image that has performed the region selection step S4, that is, the circled area in Figure 9(b) is an interest Image block.

圖11為本發明之一種基於唾液結晶的排卵預測方法之一資料訓練流程暨唾液結晶分類器產生圖,請參考圖11。在進行機器學習模型訓練時,首先提供一訓練影像資料,且該訓練影像資料依訓練需求具有一定數量,該訓練影像資料即所謂實驗組影像,接著將該些影像進行ROIs處理找出興趣影像範圍,接著進行影像分割,將影像依所需分割成數張子影像,影像分割可以放大特徵資訊,進而增加後續的訓練效率及精準度,再進行排卵結晶與非排卵結晶影像的分類,此處所謂排卵結晶與非排卵結晶之影像乃預先已確認之,然後進行影像壓 縮,再丟入類神經網路模型進行機器學習,最後產生一結晶分類器,該結晶分類器即可作為依據唾液結晶狀態來判定是否為排卵期。 FIG. 11 is a data training process and a diagram of a saliva crystal classifier generated by a saliva crystal-based ovulation prediction method of the present invention, please refer to FIG. 11. When performing machine learning model training, first provide a training image data, and the training image data has a certain amount according to the training requirements, the training image data is the so-called experimental group image, and then these images are processed by ROIs to find the image range of interest , And then perform image segmentation. The image is divided into several sub-images as required. Image segmentation can amplify the feature information, thereby increasing the efficiency and accuracy of subsequent training, and then classify ovulation crystals and non-ovulation crystals. Here the so-called ovulation crystals The image of the non-ovulatory crystal is confirmed in advance, and then the image compression is performed Then it is thrown into the neural network model for machine learning, and finally a crystalline classifier is produced. The crystalline classifier can be used to determine whether it is ovulation based on the state of saliva crystallization.

續參考圖11,當得到該結晶分類器後,透過一測試影像資料來進行結晶分類器的效能評估測試,且該測試影像資料具有一定數量,該測試影像資料即所謂對照組影像,該測試影像資料為一經過ROIs影像處理(興趣影像處理)、影像分割、排卵與非排卵分類及壓縮之影像資料組,在進行效能評估時,設有一效能閾值R,其中該效能閾值R較佳為0.6~0.9,當效能評估測試結果大於或等於該效能閾值R時,表示該結晶分類器的排卵狀態辨識效果符合期望,反之則否,例如當效能閾值R等於0.6時,即表示預期該結晶分類器的排卵狀態辨識成功率為60%以上,因此,若該結晶分類器與該測試影像資料進行效能評估測試結果為0.7,即表示該結晶分類器的排卵狀態辨識成功率為70%,符合期望,因此將該類神經網路模型結構及參數儲存,以作為後續唾液結晶辨識時使用,反之,若該結晶分類器與該測試影像資料進行效能評估測試結果為0.5,即表示該結晶分類器的排卵狀態辨識成功率為50%,不符合期望,則回到類神經網路模型進行機器學習並調整學習參數重新訓練。 Continue to refer to FIG. 11, when the crystal classifier is obtained, the performance evaluation test of the crystal classifier is performed through a test image data, and the test image data has a certain amount. The test image data is the so-called control image. The data is an image data set that has undergone ROIs image processing (interest image processing), image segmentation, ovulation and non-ovulation classification and compression. When performing performance evaluation, a performance threshold R is set, and the performance threshold R is preferably 0.6~ 0.9, when the performance evaluation test result is greater than or equal to the performance threshold R, it means that the ovulation status recognition effect of the crystal classifier meets expectations, otherwise it is not. For example, when the performance threshold R is equal to 0.6, it means that the crystal classifier is expected to be The ovulation status recognition success rate is more than 60%. Therefore, if the performance evaluation test result of the crystal classifier and the test image data is 0.7, it means that the ovulation status recognition success rate of the crystal classifier is 70%, which is in line with expectations. The structure and parameters of this type of neural network model are stored for use in subsequent saliva crystal identification. On the contrary, if the performance evaluation test result of the crystal classifier and the test image data is 0.5, it means the ovulation state of the crystal classifier If the recognition success rate is 50%, if it does not meet expectations, it will return to the neural network model for machine learning and adjust the learning parameters to retrain.

以上所述之實施例僅係為說明本發明之技術思想及特徵,其目的在使熟習此項技藝之人士均能了解本發明之內容並據以實施,當不能以此限定本發明之專利範圍,凡依本發明之精神及說明書內容所作之均等變化或修飾,皆應涵蓋於本發明專利範圍內。 The above-mentioned embodiments are only to illustrate the technical ideas and features of the present invention, and their purpose is to enable those who are familiar with the art to understand the content of the present invention and implement them accordingly. However, the patent scope of the present invention cannot be limited by this. All the equal changes or modifications made in accordance with the spirit of the present invention and the contents of the specification shall be covered by the scope of the patent of the present invention.

S1:影像擷取步驟 S1: Image capture step

S2:色系轉換步驟 S2: Color system conversion steps

S3:顏色偵測步驟 S3: Color detection step

S4:區域選取步驟 S4: Region selection steps

S5:結晶狀態分類步驟 S5: Steps to classify crystalline state

S6:排卵狀態辨識步驟 S6: Steps to identify ovulation status

Claims (11)

一種基於唾液結晶的排卵預測方法,包含:取得一預辨識影像;將該預辨識影像進行一色系轉換步驟,透過HSV顏色轉換將該預辨識影像進行顏色轉換,經由過濾特定顏色後取得一轉換影像;將該轉換影像進行一顏色偵測步驟,判斷該轉換影像中的黑色或綠色之分布覆蓋率是否為最大或次大來進行影像篩選,用以確認該預辨識影像是否為有效之影像;將該轉換影像進行一區域選取,對該轉換影像進行影像邊緣偵測,取得該轉換影像中一唾液結晶區域,用以取得一興趣影像區塊;執行一結晶狀態分類步驟,將該興趣影像區塊進行結晶狀態分類;及執行一排卵狀態判斷步驟,將該結晶狀態分類步驟所得之該興趣影像區塊之影像做最終結果判斷,判斷該預辨識影像為排卵期或非排卵期。 A method for predicting ovulation based on saliva crystallization, including: obtaining a pre-identified image; performing a color conversion step on the pre-identified image, performing color conversion on the pre-identified image through HSV color conversion, and obtaining a converted image after filtering a specific color ; Perform a color detection step on the converted image to determine whether the black or green distribution coverage in the converted image is the largest or second largest for image screening to confirm whether the pre-identified image is a valid image; Perform a region selection on the converted image, perform image edge detection on the converted image, obtain a saliva crystallized area in the converted image to obtain an image block of interest; perform a crystallization state classification step to perform the image block of interest Carrying out crystallization state classification; and performing an ovulation state determination step, the final result determination of the image of the interest image block obtained by the crystallization state classification step, and determining whether the pre-identified image is an ovulation or non-ovulation period. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,在進行該色系轉換步驟另包含執行一重新取得預辨識影像步驟,用以重新取得一預辨識影像。 The method for predicting ovulation based on saliva crystals as described in claim 1, wherein the step of performing the color system conversion further includes performing a step of reacquiring a pre-identified image to re-acquire a pre-identified image. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,該顏色偵測步驟另設有一範圍閾值,該範圍閾值為0.6~0.9,且該顏色偵測步驟包含將該轉換 影像中的黑色及綠色的覆蓋率相加,並計算兩者的覆蓋率之和與全體顏色覆蓋率之和的比值是否大於等於該範圍閾值。 The method for predicting ovulation based on saliva crystals as described in claim 1, wherein the color detection step is additionally provided with a range threshold, the range threshold is 0.6 to 0.9, and the color detection step includes the conversion Add the coverage of black and green in the image, and calculate whether the ratio of the sum of the coverage of the two to the sum of the total color coverage is greater than or equal to the range threshold. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,該區域選取步驟係採用二元搜尋法,圈選取出一圓形興趣影像區塊。 The method for ovulation prediction based on saliva crystals described in the first item of the patent application, wherein the region selection step adopts a binary search method to circle and select a circular image block of interest. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,該結晶狀態分類步驟係採用ResNet(Residual Neural Network)學習模型進行訓練。 According to the ovulation prediction method based on saliva crystals as described in item 1 of the scope of patent application, the crystallization state classification step is trained by using a ResNet (Residual Neural Network) learning model. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,該排卵狀態判斷步驟另設有一機率閾值,該機率閾值為0.5~0.9。 The method for predicting ovulation based on saliva crystals as described in item 1 of the scope of patent application, wherein the ovulation state determination step is additionally provided with a probability threshold, and the probability threshold is 0.5 to 0.9. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,於該區域選取步驟之後並於執行該結晶狀態分類步驟之前,另執行一影像分割步驟,將該興趣影像區塊進行影像分割,取得數分割影像,以提升辨識效率。 The method for predicting ovulation based on saliva crystals as described in claim 1, wherein after the region selection step and before performing the crystallization state classification step, another image segmentation step is performed to perform the image block of interest Image segmentation, to obtain multiple segmented images to improve recognition efficiency. 如申請專利範圍第7項所述之基於唾液結晶的排卵預測方法,其中,該影像分割步驟係以十字分割法將該興趣影像區塊分割成四個子影像區塊。 The method for predicting ovulation based on saliva crystals as described in item 7 of the scope of patent application, wherein the image segmentation step is to divide the image block of interest into four sub-image blocks by a cross segmentation method. 如申請專利範圍第6項所述之基於唾液結晶的排卵預測方法,其中,該排卵狀態判定步驟另設有一數量閾值,該數量閾值為1~3。 The method for predicting ovulation based on saliva crystals as described in item 6 of the scope of patent application, wherein the ovulation state determination step is additionally provided with a number threshold, and the number threshold is 1~3. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,於該區域選取步驟之後並於執行該結晶狀態分類步驟之前,另執行一影像壓縮步驟,將該興趣影像區塊進行影像壓縮,以提升辨識效率。 The method for predicting ovulation based on saliva crystals as described in claim 1, wherein after the region selection step and before the crystallization state classification step, another image compression step is performed to perform the image block of interest Image compression to improve recognition efficiency. 如申請專利範圍第1項所述之基於唾液結晶的排卵預測方法,其中,該結晶狀態分類步驟另包含執行一資料擴增步驟,用以獲得擁有更多相同特徵的影像資料,以提升辨識正確率。 The method for ovulation prediction based on saliva crystals as described in claim 1, wherein the crystallization state classification step further includes performing a data amplification step to obtain more image data with the same characteristics to improve the recognition accuracy rate.
TW108114662A 2019-04-26 2019-04-26 Ovulation prediction method based on saliva crystallization TWI701640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108114662A TWI701640B (en) 2019-04-26 2019-04-26 Ovulation prediction method based on saliva crystallization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108114662A TWI701640B (en) 2019-04-26 2019-04-26 Ovulation prediction method based on saliva crystallization

Publications (2)

Publication Number Publication Date
TWI701640B true TWI701640B (en) 2020-08-11
TW202040516A TW202040516A (en) 2020-11-01

Family

ID=73003037

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108114662A TWI701640B (en) 2019-04-26 2019-04-26 Ovulation prediction method based on saliva crystallization

Country Status (1)

Country Link
TW (1) TWI701640B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040122787A1 (en) * 2002-12-18 2004-06-24 Avinash Gopal B. Enhanced computer-assisted medical data processing system and method
CN106137263A (en) * 2016-07-25 2016-11-23 南京盟联信息科技股份有限公司 A kind of ovulation analyzer based on high in the clouds analytical technology and assay method thereof
TWI569766B (en) * 2015-07-15 2017-02-11 A method for predicting saliva image recognition in female ovulation
TWM539905U (en) * 2016-10-18 2017-04-21 Chien-Chuan Chen Corpus luteum hormone ovulation test device featuring intelligent digital image analysis
CN206252516U (en) * 2016-08-10 2017-06-16 量准(上海)医疗科技有限公司 Quantitative determination ovulation device
CN207850973U (en) * 2018-03-06 2018-09-11 量准(上海)医疗器械有限公司 Ovulation detecting device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040122787A1 (en) * 2002-12-18 2004-06-24 Avinash Gopal B. Enhanced computer-assisted medical data processing system and method
TWI569766B (en) * 2015-07-15 2017-02-11 A method for predicting saliva image recognition in female ovulation
CN106137263A (en) * 2016-07-25 2016-11-23 南京盟联信息科技股份有限公司 A kind of ovulation analyzer based on high in the clouds analytical technology and assay method thereof
CN206252516U (en) * 2016-08-10 2017-06-16 量准(上海)医疗科技有限公司 Quantitative determination ovulation device
TWM539905U (en) * 2016-10-18 2017-04-21 Chien-Chuan Chen Corpus luteum hormone ovulation test device featuring intelligent digital image analysis
CN207850973U (en) * 2018-03-06 2018-09-11 量准(上海)医疗器械有限公司 Ovulation detecting device

Also Published As

Publication number Publication date
TW202040516A (en) 2020-11-01

Similar Documents

Publication Publication Date Title
WO2020221177A1 (en) Method and device for recognizing image, storage medium and electronic device
CN111612763B (en) Mobile phone screen defect detection method, device and system, computer equipment and medium
CN109154978B (en) System and method for detecting plant diseases
JP4757559B2 (en) Apparatus and method for detecting components of a subject
KR102449841B1 (en) Method and apparatus for detecting target
US9773185B2 (en) Image processing apparatus, image processing method, and computer readable recording device
JP2011188496A (en) Backlight detection device and backlight detection method
CN101983507A (en) Automatic redeye detection
US8655060B2 (en) Night-scene light source detecting device and night-scene light source detecting method
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
KR101549495B1 (en) An apparatus for extracting characters and the method thereof
WO2018010386A1 (en) Method and system for component inversion testing
JP4901229B2 (en) Red-eye detection method, apparatus, and program
WO2021114818A1 (en) Method, system, and device for oct image quality evaluation based on fourier transform
WO2019210707A1 (en) Image sharpness evaluation method, device and electronic device
CN112906550A (en) Static gesture recognition method based on watershed transformation
CN110599553B (en) Skin color extraction and detection method based on YCbCr
CN106960188B (en) Weather image classification method and device
TWI498830B (en) A method and system for license plate recognition under non-uniform illumination
CN113052234A (en) Jade classification method based on image features and deep learning technology
TWI701640B (en) Ovulation prediction method based on saliva crystallization
CN114926661B (en) Textile surface color data processing and identifying method and system
CN113989588A (en) Self-learning-based intelligent evaluation system and method for pentagonal drawing test
CN114092441A (en) Product surface defect detection method and system based on dual neural network
WO2020107196A1 (en) Photographing quality evaluation method and apparatus for photographing apparatus, and terminal device