TW201606706A - Method for filtering unsightly image from a batch of images - Google Patents

Method for filtering unsightly image from a batch of images Download PDF

Info

Publication number
TW201606706A
TW201606706A TW103127387A TW103127387A TW201606706A TW 201606706 A TW201606706 A TW 201606706A TW 103127387 A TW103127387 A TW 103127387A TW 103127387 A TW103127387 A TW 103127387A TW 201606706 A TW201606706 A TW 201606706A
Authority
TW
Taiwan
Prior art keywords
picture
feature
ratio
indecent
image
Prior art date
Application number
TW103127387A
Other languages
Chinese (zh)
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 TW103127387A priority Critical patent/TW201606706A/en
Publication of TW201606706A publication Critical patent/TW201606706A/en

Links

Abstract

A method for filtering unsightly image from a batch of images includes the following steps. Receive a batch of images uploaded according to a template by a terminal device. Execute an eye detection of each image, to determine whether the image has eye feature or not. When the image doesn't have the eye feature, execute a face detection of the image without the eye feature, to determine whether the image has front-face feature or not. When the image does have the eye feature or does have the front-face feature, execute a color-level comparison of the image with the eye feature or the front-face feature according to a complexion range, to determine whether the image has skin pattern or not. When the image has the skin pattern, execute a mouth detection of the image with the skin pattern, to determine whether the image has mouth feature or not. Decide each image with the mouth feature as unsightly image and set all unsightly images to be disabled items, such that all unsightly images are not slot in a network platform. Decide each image without the front-face feature, the skin pattern or the mouth feature as normal image and slot all normal images in a network platform according to the template.

Description

不雅圖片的過濾方法Indecent picture filtering method

本發明是關於一種網路平台之圖片發布技術,特別是關於一種不雅圖片的過濾方法。The invention relates to a picture publishing technology of a network platform, in particular to a filtering method for an indecent picture.

隨著網路通訊與資訊科技的日新月異,網際網路的興起帶來快速便利的通訊環境及資訊的流通,以致越來越多的人開始依賴於網路從事娛樂、研究及商務活動。With the rapid development of Internet communication and information technology, the rise of the Internet has brought about a fast and convenient communication environment and the flow of information, so that more and more people are relying on the Internet for entertainment, research and business activities.

以電子商務(e-commerce)為例,賣方能藉由網路伺服器在網路平台上展示銷售資訊,而買方則藉由終端設備在同一網路平台上瀏覽和選擇欲購買之商品並且直接在線上完成交易。在電子商務中,賣方不需實體店面即能提供賣家及商品等各種資訊給買方瞭解因而能節省大量店面租金,而買方不需出門即可選購商品並宅配到家,因此電子商務已成為商業必備的經營模式。In the case of e-commerce, the seller can display the sales information on the network platform through the web server, and the buyer browses and selects the goods to be purchased on the same network platform through the terminal device and directly Complete the transaction online. In e-commerce, the seller can provide various information such as sellers and goods to the buyer without having to store the storefront, thus saving a lot of store rent, and the buyer can purchase the goods and go home without going out, so e-commerce has become a business necessity. Business model.

為了要將欲販賣之商品推銷出去,賣家通常會以大量的圖片、文字或影片等方式介紹商品之特色及用途等資訊,以吸引消費者前來購買。在電子商務的網站平台中,若商品圖片出現不雅的圖片,將會影響提供網站平台的公司及賣方的商譽。In order to sell the goods to be sold, the seller usually introduces the characteristics and uses of the products in a large number of pictures, texts or videos to attract consumers to purchase. In the e-commerce website platform, if the product image appears indecent, it will affect the goodwill of the company and the seller who provide the website platform.

雖然傳統上之影像辨識技術能直接對可疑的圖片資料進行過濾,但其辨識費時和/或其辨識效果無法達到令人滿意的程度。另一種圖片過濾方法是採資料庫比對的方式進行。但此種方法只能針對資料庫所存的已知圖片進行比對,至於資料庫中未存有的不雅圖片則只能判別為正常圖片。因此,需要更有效率的圖片過濾方法。Although the traditional image recognition technology can directly filter suspicious image data, its identification time and/or its recognition effect cannot be satisfactory. Another method of image filtering is to use a database comparison method. However, this method can only be used to compare the known pictures stored in the database. As for the indecent pictures that are not stored in the database, they can only be judged as normal pictures. Therefore, a more efficient image filtering method is needed.

在一實施例中,不雅圖片的過濾方法包括:接收一終端設備基於一模板批量上傳之複數圖片、進行各圖片的眼睛偵測以判斷各圖片是否具有一眼睛特徵、當圖片不具有眼睛特徵時,進行不具有眼睛特徵之圖片的人臉偵測以判斷圖片是否具有一正臉特徵、當圖片具有眼睛特徵或具有正臉特徵時,根據一膚色範圍進行具有眼睛特徵或具有正臉特徵之圖片的色階比對以判斷圖片是否具有一皮膚圖塊、當圖片具有皮膚圖塊時,進行具有皮膚圖塊之圖片的嘴巴偵測以判斷圖片是否具有一嘴巴特徵、將不具有正臉特徵、不具有膚色區塊或不具有嘴巴特徵的圖片判定為正常圖片並將所有正常圖片基於模板上架至一網路平台、以及將具有嘴巴特徵的圖片判定為不雅圖片並將所有不雅圖片設為禁能項目以致不在網路平台上上架。In an embodiment, the filtering method of the indecent picture includes: receiving a plurality of pictures that are batch-uploaded by a terminal device based on a template, performing eye detection of each picture to determine whether each picture has an eye feature, and when the picture does not have an eye feature Performing face detection without a picture of the eye feature to determine whether the picture has a positive face feature, and when the picture has an eye feature or a positive face feature, having an eye feature or a positive face feature according to a skin color range The color scale of the picture is compared to determine whether the picture has a skin tile. When the picture has a skin tile, the mouth detection of the picture with the skin tile is performed to determine whether the picture has a mouth feature and will not have a positive face feature. A picture that does not have a skin color block or has no mouth feature is determined to be a normal picture and all normal pictures are based on a template to a network platform, and a picture having a mouth feature is determined as an indecent picture and all indecent pictures are set For the ban project, it is not on the Internet platform.

綜上,根據本發明之不雅圖片的過濾方法應用在一網路伺服器,能提供一網路平台具有相對快速且精準之過濾檢測不雅圖片的能力。In summary, the filtering method of the indecent picture according to the present invention is applied to a network server, which can provide a network platform with relatively fast and accurate filtering and detecting indecent pictures.

參照第1至3圖,不雅圖片的過濾方法應用在一網路伺服器10。於此,網路伺服器10提供一網路平台20。使用者能使用一終端設備30藉由網路40連接網路伺服器10,以上傳並發布複數圖片在網路平台20上。於此,網路伺服器10至少具備有處理單元110、儲存單元130、網路模組150、第一計數器170與第二計數器172,並且儲存單元130、網路模組150、第一計數器170與第二計數器172電性連接理單元110。因此,根據本發明之不雅圖片的過濾方法可藉由處理單元110執行儲存在儲存單元130中之韌體或軟體演算法而實現在網路伺服器10上。於此,網路伺服器10能藉由網路模組150連結網路40,並且經由網路40與終端設備30通訊。於此,網路平台20可為購物網站、部落格、電子相簿或社群網站等。Referring to Figures 1 to 3, the filtering method of the indecent picture is applied to a network server 10. Here, the network server 10 provides a network platform 20. The user can connect to the web server 10 via the network 40 using a terminal device 30 to upload and publish a plurality of pictures on the network platform 20. The network server 10 is provided with at least a processing unit 110, a storage unit 130, a network module 150, a first counter 170 and a second counter 172, and a storage unit 130, a network module 150, and a first counter 170. The second counter 172 is electrically connected to the processing unit 110. Therefore, the filtering method of the indecent picture according to the present invention can be implemented on the network server 10 by the processing unit 110 executing the firmware or software algorithm stored in the storage unit 130. Here, the network server 10 can connect to the network 40 via the network module 150 and communicate with the terminal device 30 via the network 40. Here, the web platform 20 can be a shopping website, a blog, an electronic photo album, or a social networking website.

處理單元110接收終端設備30基於網路平台20的模板批量上傳之複數圖片(步驟S10),並且將接收到的圖片儲存在儲存單元130中。隨後,處理單元110依序進行接收到的每一張圖片的過濾檢測,以判定上傳之圖片為正常圖片或為不雅圖片。The processing unit 110 receives the plurality of pictures that the terminal device 30 batch uploads based on the template of the network platform 20 (step S10), and stores the received pictures in the storage unit 130. Then, the processing unit 110 sequentially performs filtering detection of each received picture to determine that the uploaded picture is a normal picture or an indecent picture.

在各圖片的過濾檢測流程中,處理單元110先進行圖片的眼睛偵測(步驟S20),以判斷此圖片是否具有一眼睛特徵(步驟S22)。當圖片不具有眼睛特徵時,處理單元110進行不具有眼睛特徵之圖片的人臉偵測(步驟S30),以判斷圖片是否具有一正臉特徵(步驟S32)。當圖片具有眼睛特徵或具有正臉特徵時,處理單元110根據一膚色範圍進行具有眼睛特徵或具有正臉特徵之圖片的色階比對(步驟S40),以判斷圖片是否具有一皮膚圖塊(步驟S42)。當圖片具有皮膚圖塊時,處理單元110進行具有皮膚圖塊之圖片的嘴巴偵測(步驟S50),以判斷圖片是否具有一嘴巴特徵(步驟S52)。於此,處理單元110將不具有正臉特徵、不具有膚色區塊或不具有嘴巴特徵的圖片判定為正常圖片(步驟S60),並且將具有嘴巴特徵的圖片判定為不雅圖片(步驟S70)。In the filtering detection process of each picture, the processing unit 110 first performs eye detection of the picture (step S20) to determine whether the picture has an eye feature (step S22). When the picture does not have an eye feature, the processing unit 110 performs face detection without a picture of the eye feature (step S30) to determine whether the picture has a positive face feature (step S32). When the picture has an eye feature or has a positive face feature, the processing unit 110 performs a tone scale comparison with an eye feature or a picture having a positive face feature according to a skin color range (step S40) to determine whether the picture has a skin tile ( Step S42). When the picture has a skin tile, the processing unit 110 performs mouth detection with a picture of the skin tile (step S50) to determine whether the picture has a mouth feature (step S52). Here, the processing unit 110 determines a picture that does not have a positive face feature, does not have a skin color block or does not have a mouth feature as a normal picture (step S60), and determines a picture having a mouth feature as an indecent picture (step S70) .

然後,處理單元110接續進行下一張圖片的過濾檢測(即,回到步驟S20),直至完成所有圖片的過濾檢測。在完成所有圖片的過濾檢測後,處理單元110將所有正常圖片基於上傳時選擇的模板上架至網路平台,以及將所有不雅圖片設為禁能項目以致不在網路平台上上架(步驟S80)。於此,不雅圖片是指色情圖片或具有裸露人體之圖片。Then, the processing unit 110 successively performs the filtering detection of the next picture (ie, returns to step S20) until the filtering detection of all the pictures is completed. After the filtering detection of all the pictures is completed, the processing unit 110 uploads all the normal pictures based on the template selected at the time of uploading to the network platform, and sets all the indecent pictures as the disabled items so as not to be put on the network platform (step S80). . Here, an indecent picture refers to an erotic picture or a picture with a bare body.

其中,步驟S20、S30、S50能分別透過知識辨識技術或統計辨識技術來達成。其中,知識辨識法主要利用先前知識將人臉看作器官特徵的組合,然後根據眼睛、眉毛、嘴巴、鼻子等器官的特徵以及相互之間的幾何位置關係來檢測。統計辨識法是將人臉看作一個整體的模式(例如:二維圖元矩陣),然後從統計的觀點透過大量人臉圖像樣本來建構人臉模式空間,再根據相似度來檢測。在機器學習領域中,很多辨識技術的演算法都是對事物進行分類或聚類的過程。一般對已知物體類別總數的識別方式我們稱之為分類,並且訓練的資料是有標籤的(例如:明確指定此資料是具有人臉特徵還是不具有人臉特徵)。聚類為存在可以處理類別總數不確定的方法或者訓練的資料是沒有標籤的,並且其不需要學習階段中關於物體類別的資訊。The steps S20, S30, and S50 can be achieved by using a knowledge identification technology or a statistical identification technology, respectively. Among them, the knowledge identification method mainly uses the prior knowledge to regard the face as a combination of organ characteristics, and then detects according to the characteristics of the eyes, eyebrows, mouth, nose and other organs and the geometric positional relationship between them. The statistical identification method is a model in which a face is regarded as a whole (for example, a two-dimensional primitive matrix), and then a face image space is constructed from a statistical viewpoint through a large number of face image samples, and then detected according to the similarity. In the field of machine learning, many algorithms for identification techniques are processes that classify or cluster things. The way in which the total number of known object categories is generally identified is referred to as classification, and the training material is tagged (eg, explicitly specifying whether the material has facial features or no facial features). Clustering is a method in which there is uncertainty in the total number of categories that can be processed or training is unlabeled, and it does not require information about the object class in the learning phase.

在一些實施例中,在步驟S20、S30、S50中,處理單元110使用哈爾(Haar-1ike)特徵來偵測欲判定的特徵(眼睛特徵、正臉特徵或嘴巴特徵)。於此,處理單元110使用積分影像(Integral Image)對哈爾特徵求值進行加速,並且使用AdaBoost(自適應增強)演算法訓練區分人臉和非人臉的強分類器以及使用篩選式級聯把強分類器級聯到一起。In some embodiments, in steps S20, S30, S50, processing unit 110 uses a Haar-1ike feature to detect features (eye features, face features, or mouth features) to be determined. Here, the processing unit 110 accelerates the Haar feature evaluation using an integral image (Integral Image), and uses the AdaBoost (Adaptive Enhancement) algorithm to train a strong classifier that distinguishes between faces and non-human faces and uses a filter cascade. Concatenate strong classifiers together.

參照第4圖,使用哈爾(Haar-1ike)特徵的偵測步驟包括將此圖片的色階轉為灰階(即,轉成灰階圖片)(步驟S91)、以一既定視窗找出此圖片中的複數矩形特徵(步驟S93)、利用積分圖(Integral image)計算此些矩形特徵(即,哈爾特徵)的特徵值(步驟S95)、以及根據計算出的特徵值判定是否具有欲偵測的特徵(眼睛特徵、正臉特徵或嘴巴特徵)(步驟S97)。Referring to FIG. 4, the detecting step using the Haar-1ike feature includes converting the color gradation of the picture to a gray level (ie, converting to a grayscale picture) (step S91), finding this in a predetermined window. a complex rectangular feature in the picture (step S93), calculating an eigenvalue of the rectangular features (ie, Haar features) using an integral map (step S95), and determining whether to have a temptation based on the calculated eigenvalues The measured feature (eye feature, face feature or mouth feature) (step S97).

於此,矩形特徵包括4個邊界特徵、8個線特徵以及2個中心特徵,並且每個特徵是由2~3個矩形所組成。此些矩形特徵可表示如式1。Here, the rectangular feature includes four boundary features, eight line features, and two center features, and each feature is composed of 2 to 3 rectangles. Such rectangular features can be expressed as Equation 1.

式1 Formula 1

其中,ω i 為矩形的權重、RectSum(ri ) 为矩形範圍內之圖像的灰階積分、以及 N 是组成矩形特徵的矩形個數。Where ω i is the weight of the rectangle, RectSum( r i ) is the gray level integral of the image in the rectangular range, and N is the number of rectangles constituting the rectangular feature.

矩形特徵的計算公式如式2。The calculation formula of the rectangular feature is as shown in Equation 2.

式2Equation 2

其中,W為圖片的寬、H為圖片的長、w為矩形特徵的寬、以及h為矩形特徵的長。因此,W×H為圖片的大小、w×h為矩形特徵(第5圖的左側)的大小,而矩形特徵在水平和垂直方向的能放大的最大比例係數如式3。Where W is the width of the picture, H is the length of the picture, w is the width of the rectangular feature, and h is the length of the rectangular feature. Therefore, W×H is the size of the picture, w×h is the size of the rectangular feature (the left side of FIG. 5), and the maximum scale factor of the rectangular feature in the horizontal and vertical directions is as shown in Equation 3.

式3 Equation 3

而對於45°旋轉之矩形特徵的w、h表示如第5圖的右側所示,而計算公式如式4。For the rectangular feature of 45° rotation, w and h are represented as shown on the right side of FIG. 5, and the calculation formula is as shown in Equation 4.

式4 Equation 4

此時,45°旋轉之矩形特徵在水平和垂直方向的能放大的最大比例係數如式5。At this time, the maximum scale factor of the square characteristic of the 45° rotation in the horizontal and vertical directions is as shown in Equation 5.

式5 Equation 5

在色階比對的一實施例中,參照第6圖,處理單元110以膚色範圍依序比對此圖片的複數個畫素(步驟S410),以判定當前比對之畫素是否落入此膚色範圍(步驟S412)。當處理單元110判定當前比對之畫素落入膚色範圍時,將第一計數器170中的第一計數值與第二計數器172中的第二計數值均累計加1(步驟S420)。於此,第一計數值表示已完成比對之畫素的累計數量,以及第二計數值表示落入膚色範圍之畫素的累計數量。當處理單元110判定當前比對之畫素未落入膚色範圍時,將第一計數器170中的第一計數值累計加1,但不累計第二計數器172中的第二計數值(步驟S430)。然後,處理單元110判斷第一計數值於圖片的畫素總量的佔比是否小於一第一比率(步驟S440),以及判斷第二計數值於第一計數值的佔比是否小於一第二比率(步驟S450)。In an embodiment of the gradation comparison, referring to FIG. 6, the processing unit 110 sequentially compares the plurality of pixels of the picture with the skin color range (step S410) to determine whether the currently aligned pixels fall into the picture. The skin color range (step S412). When the processing unit 110 determines that the currently aligned pixel falls within the skin color range, the first count value in the first counter 170 and the second count value in the second counter 172 are both accumulated by one (step S420). Here, the first count value indicates the cumulative number of pixels that have completed the alignment, and the second count value indicates the cumulative number of pixels that fall within the skin color range. When the processing unit 110 determines that the currently aligned pixels do not fall within the skin color range, the first count value in the first counter 170 is cumulatively incremented by 1, but the second count value in the second counter 172 is not accumulated (step S430). . Then, the processing unit 110 determines whether the ratio of the first count value to the total pixel count of the picture is less than a first ratio (step S440), and determines whether the ratio of the second count value to the first count value is less than a second Ratio (step S450).

當第一計數值於圖片的畫素總量的佔比小於第一比率或第二計數值於第一計數值的佔比不小於第二比率時,處理單元110接續進行下一個畫素的比對(即,回到步驟S412),直至完成此圖片中所有畫素的比對。當第一計數值於圖片的畫素總量的佔比不小於第一比率且第二計數值於第一計數值的佔比小於第二比率時,處理單元110能直接判定此圖片不具有皮膚圖塊(步驟S470),而不用繼續進行下一個畫素的比對。When the ratio of the first count value to the total pixel count of the picture is less than the first ratio or the ratio of the second count value to the first count value is not less than the second ratio, the processing unit 110 continues to perform the ratio of the next pixel. Yes (ie, return to step S412) until the alignment of all pixels in this picture is completed. When the ratio of the first count value to the total pixel count of the picture is not less than the first ratio and the ratio of the second count value to the first count value is less than the second ratio, the processing unit 110 can directly determine that the picture does not have the skin. The tile (step S470) without continuing the comparison of the next pixel.

於完成所有畫素的比對後,處理單元110再判斷第二計數值於圖片的畫素總量的佔比是否落在比率範圍內(步驟S460)。當第二計數值於圖片的畫素總量的佔比未落在比率範圍內時,處理單元110則判定此圖片不具有皮膚圖塊(步驟S470)。反之,當第二計數值於圖片的畫素總量的佔比落在比率範圍內時,處理單元110則判定此圖片具有皮膚圖塊(步驟S480)。After completing the comparison of all the pixels, the processing unit 110 further determines whether the proportion of the second count value to the total number of pixels of the picture falls within the ratio range (step S460). When the ratio of the second count value to the total number of pixels of the picture does not fall within the ratio range, the processing unit 110 determines that the picture does not have a skin tile (step S470). On the other hand, when the ratio of the second count value to the total number of pixels of the picture falls within the ratio range, the processing unit 110 determines that the picture has a skin tile (step S480).

於此,膚色範圍能依據網路平台提供服務的地區而定。舉例來說,色階中有36種膚色#1~#36,如第7圖所示。世界膚色分佈能分成8種膚色範圍G1~G8。其中,膚色範圍G1為膚色#1~#12、膚色範圍G21為膚色#12~#14、膚色範圍G3為膚色#15~#17、膚色範圍G4為膚色#18~#20、膚色範圍G5為膚色#21~#23、膚色範圍G6為膚色#24~#26、膚色範圍G7為膚色#27~#29、以及膚色範圍G8為膚色#30~#36。網路平台20的提供者能依據服務地區選擇膚色範圍G1~G8中之一設定為程式參數,以供色階比對使用。換言之,色階比對所使用之膚色範圍為膚色範圍G1~G8中之一,並預先設定儲存在儲存單元130中。Here, the skin color range can be determined according to the region where the network platform provides services. For example, there are 36 skin colors #1~#36 in the color scale, as shown in Figure 7. The world skin color distribution can be divided into 8 skin color ranges G1~G8. Among them, the skin color range G1 is the skin color #1~#12, the skin color range G21 is the skin color #12~#14, the skin color range G3 is the skin color #15~#17, the skin color range G4 is the skin color #18~#20, and the skin color range G5 is Skin color #21~#23, skin color range G6 is skin color #24~#26, skin color range G7 is skin color #27~#29, and skin color range G8 is skin color #30~#36. The provider of the network platform 20 can select one of the skin color ranges G1 to G8 according to the service area as a program parameter for use in the color scale comparison. In other words, the skin color range used for the color scale comparison is one of the skin color ranges G1 to G8, and is stored in the storage unit 130 in advance.

其中,第一比率可為60%,即,已完成比對之畫素的累計數量於圖片的畫素總量中所佔的比例為60%。第二比率可為50%,即,落入膚色範圍之畫素的累計數量於已完成比對之畫素的累計數量中所佔的比例為50%。Wherein, the first ratio may be 60%, that is, the cumulative number of pixels that have completed the comparison is 60% of the total number of pixels of the picture. The second ratio may be 50%, that is, the cumulative amount of pixels falling within the skin color range is 50% of the cumulative number of pixels that have completed the comparison.

其中,比率範圍由第一閥值與第二閥值所構成,並且第一閥值小於第二閥值。於此,第一閥值可大於或等於20%,即,落入膚色範圍之畫素的累計數量於圖片的畫素總量中所佔的比例大於或等於20%。並且,第二閥值小於100%,即,落入膚色範圍之畫素的累計數量於圖片的畫素總量中所佔的比例小於100%。較佳地,第一閥值為20%~30%,而第二閥值為90%。Wherein the ratio range is composed of the first threshold value and the second threshold value, and the first threshold value is smaller than the second threshold value. Here, the first threshold may be greater than or equal to 20%, that is, the cumulative amount of pixels falling within the skin color range is greater than or equal to 20% of the total number of pixels in the picture. Moreover, the second threshold is less than 100%, that is, the cumulative amount of pixels falling within the skin color range is less than 100% of the total number of pixels in the picture. Preferably, the first threshold is 20% to 30% and the second threshold is 90%.

於色階比對的過程中,處理單元110判會先將圖片由第一顏色空間轉為第二顏色空間,然後再以第二顏色空間之圖片判定此圖片是否具有皮膚圖塊(即,接續執行步驟S410 )。於此,第一顏色空間可為RGB,而第二顏色空間可為YUV(Luminance/Chrominance/ Chroma;亮度/色度/濃度)、HSV(Hue/Saturation/Value;色相/飽和度/明度)或YIQ(Luminance/In phase/Quadrature phase;亮度/色彩)等。In the process of gradation alignment, the processing unit 110 determines that the picture is first converted from the first color space to the second color space, and then determines whether the picture has a skin tile by using a picture of the second color space (ie, contiguous Step S410) is performed. Here, the first color space may be RGB, and the second color space may be YUV (Luminance/Chrominance/Chroma; brightness/chroma/density), HSV (Hue/Saturation/Value; hue/saturation/lightness) or YIQ (Luminance/In phase/Quadrature phase; brightness/color).

於此,儲存單元130可由一個或多個儲存元件所實現。儲存元件可以是例如記憶體或暫存器等,但在此並不對其限制。記憶體可例如唯讀記憶體、隨機訪問記憶體、非永久性記憶體、永久性記憶體、靜態記憶體、動態記憶體、快閃記憶體和/或任何存儲數位資訊的設備。處理單元110可由一個或多個處理元件所實現。處理元件可以是微處理器、微控制器、數位信號處理器、微型機算計、中央處理器、場編程閘陣列、可編程邏輯設備、狀態器、邏輯電路、類比電路、數位電路和/或任何基於操作指令操作信號(類比和/或數位)的設備。Here, the storage unit 130 can be implemented by one or more storage elements. The storage element may be, for example, a memory or a scratchpad, but is not limited thereto. The memory can be, for example, a read only memory, a random access memory, a non-permanent memory, a permanent memory, a static memory, a dynamic memory, a flash memory, and/or any device that stores digital information. Processing unit 110 may be implemented by one or more processing elements. Processing elements can be microprocessors, microcontrollers, digital signal processors, microprocessors, central processing units, field programmable gate arrays, programmable logic devices, state devices, logic circuits, analog circuits, digital circuits, and/or any A device that operates on signals (analog and/or digits) based on operational instructions.

綜上,根據本發明之不雅圖片的過濾方法應用在一網路伺服器,能提供一網路平台具有相對快速且精準之過濾檢測不雅圖片的能力。舉例來說,以第一比率為60%、第二比率為50%且比率範圍為25%~90%為例,利用本發明一實施例之不雅圖片的過濾方法完成25G且不雅圖片佔25%之圖片的過濾檢測需耗費11.45小時,並且準確率為87%。人工檢測則需耗費48小時。In summary, the filtering method of the indecent picture according to the present invention is applied to a network server, which can provide a network platform with relatively fast and accurate filtering and detecting indecent pictures. For example, taking the first ratio as 60%, the second ratio as 50%, and the ratio ranging from 25% to 90% as an example, the filtering method of the indecent picture of one embodiment of the present invention is used to complete 25G and the indecent picture is occupied. Filter detection of 25% of the images takes 11.45 hours and the accuracy is 87%. Manual testing takes 48 hours.

10‧‧‧網路伺服器
110‧‧‧處理單元
130‧‧‧儲存單元
150‧‧‧網路模組
170‧‧‧第一計數器
172‧‧‧第二計數器
20‧‧‧網路平台
30‧‧‧終端設備
40‧‧‧網路
S10‧‧‧接收終端設備基於模板批量上傳之複數圖片
S20‧‧‧進行一張圖片的眼睛偵測
S22‧‧‧是否具有眼睛特徵?
S30‧‧‧進行此圖片的人臉偵測
S32‧‧‧是否具有正臉特徵?
S40‧‧‧進行此圖片的色階比對
S42‧‧‧是否具有皮膚圖塊?
S50‧‧‧進行此圖片的嘴巴偵測
S52‧‧‧是否具有嘴巴特徵?
S60‧‧‧將此圖片判定為正常圖片
S70‧‧‧將此圖片判定為不雅圖片
S80‧‧‧將所有正常圖片基於選擇的模板上架至網路平台,以及將所有不雅圖片設為禁能項目以致不在網路平台上上架
S91‧‧‧將圖片轉為灰階圖片
S93‧‧‧以一既定視窗找出此圖片中的複數矩形特徵
S95‧‧‧利用積分圖計算此些矩形特徵的特徵值
S97‧‧‧根據計算出的特徵值判定是否具有欲偵測的特徵
S410‧‧‧以膚色範圍依序比對此圖片的複數個畫素
S412‧‧‧是否落入膚色範圍?
S420‧‧‧將第一計數值與第二計數值均累計加1
S430‧‧‧將第一計數值累計加1,但不累計第二計數值
S440‧‧‧是否小於第一比率?
S450‧‧‧是否小於第二比率?
S460‧‧‧是否落在比率範圍內?
S470‧‧‧判定不具有皮膚圖塊
S480‧‧‧判定具有皮膚圖塊
W‧‧‧圖片的寬
H‧‧‧圖片的長
w‧‧‧矩形特徵的寬
h‧‧‧矩形特徵的長
#1~#36‧‧‧膚色
G1‧‧‧膚色範圍
G2‧‧‧膚色範圍
G3‧‧‧膚色範圍
G4‧‧‧膚色範圍
G5‧‧‧膚色範圍
G6‧‧‧膚色範圍
G7‧‧‧膚色範圍
G8‧‧‧膚色範圍
10‧‧‧Web server
110‧‧‧Processing unit
130‧‧‧storage unit
150‧‧‧Network Module
170‧‧‧First counter
172‧‧‧second counter
20‧‧‧Internet platform
30‧‧‧ Terminal equipment
40‧‧‧Network
S10‧‧‧Receive terminal device batch uploading multiple pictures based on template
S20‧‧‧A picture of eye detection
Does S22‧‧‧ have eye characteristics?
S30‧‧‧ Face detection for this picture
Does S32‧‧‧ have a positive face feature?
S40‧‧‧The color scale comparison of this picture
Does S42‧‧‧ have skin patches?
S50‧‧‧The mouth detection of this picture
Does S52‧‧‧ have mouth characteristics?
S60‧‧‧Determine this picture as a normal picture
S70‧‧‧Determining this picture as indecent
S80‧‧‧Put all normal pictures based on the selected template to the network platform, and set all indecent pictures as disabled items so that they are not on the network platform
S91‧‧‧ Convert pictures to grayscale pictures
S93‧‧‧ Find the complex rectangular features in this picture in a given window
S95‧‧‧Using integral graphs to calculate the eigenvalues of these rectangular features
S97‧‧‧Determine whether there are features to be detected based on the calculated eigenvalues
S410‧‧‧Compare the multiple pixels of this picture in order of skin color
Does S412‧‧‧ fall into the skin color range?
S420‧‧‧ Add 1 to the first count value and the second count value
S430‧‧‧To add 1 to the first count value, but not to accumulate the second count value
Is S440‧‧‧ less than the first ratio?
Is S450‧‧‧ less than the second ratio?
Does S460‧‧‧ fall within the ratio?
S470‧‧‧Determined that there is no skin patch
S480‧‧‧Determined with a skin patch
W‧‧‧ Pictures wide
H‧‧‧The length of the picture
w ‧‧‧The width of the rectangular feature
h ‧‧‧The length of the rectangular feature
#1~#36‧‧‧ Skin color
G1‧‧‧ skin color range
G2‧‧‧ skin color range
G3‧‧‧ skin color range
G4‧‧‧ skin color range
G5‧‧‧ skin color range
G6‧‧‧ skin color range
G7‧‧‧ skin color range
G8‧‧‧ skin color range

[第1圖]為根據本發明一實施例之不雅圖片的過濾方法的流程圖。 [第2圖]為應用本發明一實施例之不雅圖片的過濾方法的系統示意圖。 [第3圖]為第2圖中之網路伺服器的概要方塊圖。 [第4圖]為本發明一實施例之使用哈爾(Haar-1ike)特徵的偵測步驟的細部流程圖。 [第5圖]為本發明一實施例之矩形特徵的示意圖。 [第6圖]為第1圖中之一實施例之步驟S40及S42的細部流程圖。 [第7圖]為本發明一實施例之膚色表的示意圖。 [第8圖]為本發明一實施例之世界膚色分布的示意圖。[FIG. 1] is a flowchart of a filtering method of an indecent picture according to an embodiment of the present invention. [Fig. 2] is a system diagram showing a filtering method of an indecent picture to which an embodiment of the present invention is applied. [Fig. 3] is a schematic block diagram of the network server in Fig. 2. [Fig. 4] is a detailed flowchart of a detecting step using a Haar-1ike feature according to an embodiment of the present invention. [Fig. 5] is a schematic view showing a rectangular feature according to an embodiment of the present invention. [Fig. 6] is a detailed flowchart of steps S40 and S42 of an embodiment of Fig. 1. [Fig. 7] A schematic view of a skin color table according to an embodiment of the present invention. [Fig. 8] Fig. 8 is a schematic view showing the distribution of world skin color according to an embodiment of the present invention.

S10‧‧‧接收終端設備基於模板批量上傳之複數圖片 S10‧‧‧Receive terminal device batch uploading multiple pictures based on template

S20‧‧‧進行一張圖片的眼睛偵測 S20‧‧‧A picture of eye detection

S22‧‧‧是否具有眼睛特徵? Does S22‧‧‧ have eye characteristics?

S30‧‧‧進行此圖片的人臉偵測 S30‧‧‧ Face detection for this picture

S32‧‧‧是否具有正臉特徵? Does S32‧‧‧ have a positive face feature?

S40‧‧‧進行此圖片的色階比對 S40‧‧‧The color scale comparison of this picture

S42‧‧‧是否具有皮膚圖塊? Does S42‧‧‧ have skin patches?

S50‧‧‧進行此圖片的嘴巴偵測 S50‧‧‧The mouth detection of this picture

S52‧‧‧是否具有嘴巴特徵? Does S52‧‧‧ have mouth characteristics?

S60‧‧‧將此圖片判定為正常圖片 S60‧‧‧Determine this picture as a normal picture

S70‧‧‧將此圖片判定為不雅圖片 S70‧‧‧Determining this picture as indecent

S80‧‧‧將所有正常圖片基於選擇的模板上架至網路平台,以及將所有不雅圖片設為禁能項目以致不在網路平台上上架 S80‧‧‧Put all normal pictures based on the selected template to the network platform, and set all indecent pictures as disabled items so that they are not on the network platform

Claims (9)

一種不雅圖片的過濾方法,包括: 接收一終端設備基於一模板批量上傳之複數圖片; 進行各該圖片的眼睛偵測,以判斷各該圖片是否具有一眼睛特徵; 當該圖片不具有該眼睛特徵時,進行不具有該眼睛特徵之該圖片的人臉偵測,以判斷該圖片是否具有一正臉特徵; 當該圖片具有該眼睛特徵或具有該正臉特徵時,根據一膚色範圍進行具有該眼睛特徵或具有該正臉特徵之該圖片的色階比對,以判斷該圖片是否具有一皮膚圖塊; 當該圖片具有該皮膚圖塊時,進行具有該皮膚圖塊之該圖片的嘴巴偵測,以判斷該圖片是否具有一嘴巴特徵; 將不具有該正臉特徵、不具有該膚色區塊或不具有該嘴巴特徵的該圖片判定為正常圖片,並將所有該正常圖片基於該模板上架至一網路平台;以及 將具有該嘴巴特徵的該圖片判定為不雅圖片,並將所有該不雅圖片設為禁能項目以致不在該網路平台上上架。A method for filtering an indecent picture, comprising: receiving a plurality of pictures that are batch-uploaded by a terminal device based on a template; performing eye detection of each picture to determine whether each picture has an eye feature; when the picture does not have the eye a feature, performing face detection of the picture without the eye feature to determine whether the picture has a positive face feature; when the picture has the eye feature or having the positive face feature, having a skin color range Having the eye feature or the gradation of the picture having the positive face feature to determine whether the picture has a skin tile; when the picture has the skin tile, performing a mouth of the picture having the skin tile Detecting to determine whether the picture has a mouth feature; determining the picture that does not have the face feature, does not have the skin color block or does not have the mouth feature as a normal picture, and bases all the normal picture on the template Laid into a network platform; and determine the picture with the characteristics of the mouth as an indecent picture, and set all the indecent pictures as banned The project can not be put on the network platform. 如請求項1所述之不雅圖片的過濾方法,其中該色階比對步驟包括: 以該膚色範圍依序比對該圖片的複數個畫素,以判定當前比對之該畫素是否落入該膚色範圍; 當判定當前比對之該畫素落入該膚色範圍時,將一第一計數值與一第二計數值均累計加1,其中該第一計數值表示已完成比對之該畫素的累計數量,以及該第二計數值表示落入該膚色範圍之該畫素的累計數量; 當判定當前比對之該畫素未落入該膚色範圍時,將該第一計數值累計加1,但不累計該第二計數值; 判斷該第一計數值於該圖片的畫素總量的佔比是否小於一第一比率; 判斷該第二計數值於該第一計數值的佔比是否小於一第二比率; 當不小於該第一比率且小於該第二比率時,判定該圖片不具有該皮膚圖塊; 當小於該第一比率或不小於該第二比率時,判斷該第二計數值於該畫素總量的佔比是否落在一比率範圍內; 當落在該比率範圍內時,判定該圖片具有該皮膚圖塊;以及 當未落在該比率範圍內時,判定該圖片不具有該皮膚圖塊。The filtering method of the indecent picture according to claim 1, wherein the color gradation matching step comprises: sequentially comparing the plurality of pixels of the picture with the skin color range to determine whether the pixel of the current comparison falls. Entering the skin color range; when it is determined that the pixel of the current comparison falls within the skin color range, a first count value and a second count value are cumulatively increased by 1, wherein the first count value indicates that the comparison has been completed. a cumulative number of the pixels, and the second count value represents a cumulative number of the pixels falling within the skin color range; when it is determined that the current alignment does not fall within the skin color range, the first count value Adding 1 to the total, but not accumulating the second count value; determining whether the ratio of the first count value to the total number of pixels of the picture is less than a first ratio; determining the second count value at the first count value Whether the ratio is less than a second ratio; when not less than the first ratio and less than the second ratio, determining that the picture does not have the skin tile; when less than the first ratio or not less than the second ratio, determining The second count value accounts for the total amount of the pixels Whether the ratio falls within a range of ratios; when falling within the ratio range, it is determined that the picture has the skin tile; and when it does not fall within the ratio range, it is determined that the picture does not have the skin tile. 如請求項2所述之不雅圖片的過濾方法,其中該第一比率為60%,以及該第二比率為50%。A filtering method of an indecent picture as claimed in claim 2, wherein the first ratio is 60%, and the second ratio is 50%. 如請求項2或3所述之不雅圖片的過濾方法,其中該比率範圍由一第一閥值與一第二閥值所構成、該第一閥值小於該第二閥值、該第一閥值大於或等於20%,並且該第二閥值小於100%。The filtering method of the indecent picture according to claim 2 or 3, wherein the ratio range is composed of a first threshold value and a second threshold value, the first threshold value is smaller than the second threshold value, the first The threshold is greater than or equal to 20% and the second threshold is less than 100%. 如請求項4所述之不雅圖片的過濾方法,其中該第一閥值為20%~30%。The filtering method of the indecent picture according to claim 4, wherein the first threshold is 20% to 30%. 如請求項4所述之不雅圖片的過濾方法,其中該第二閥值為90%。The filtering method of the indecent picture according to claim 4, wherein the second threshold is 90%. 如請求項1所述之不雅圖片的過濾方法,其中該人臉偵測步驟包括: 將該圖片轉為灰階圖片;以及 藉由哈爾(Haar-1ike)特徵偵測該灰階圖片中的該正臉特徵。The filtering method of the indecent picture according to claim 1, wherein the face detecting step comprises: converting the picture into a grayscale picture; and detecting the gray level picture by using a Haar-1ike feature The positive face feature. 如請求項1所述之不雅圖片的過濾方法,其中該眼睛偵測步驟包括: 將該圖片轉為灰階圖片;以及 藉由哈爾特徵偵測該灰階圖片中的該眼睛特徵。The filtering method of the indecent picture according to claim 1, wherein the eye detecting step comprises: converting the picture into a grayscale picture; and detecting the eye feature in the grayscale picture by a Haar feature. 如請求項1所述之不雅圖片的過濾方法,其中該嘴巴偵測步驟包括: 將該圖片轉為灰階圖片;以及 藉由哈爾特徵偵測該灰階圖片中的該嘴巴特徵。The filtering method of the indecent picture according to claim 1, wherein the mouth detecting step comprises: converting the picture into a grayscale picture; and detecting the mouth feature in the grayscale picture by a Haar feature.
TW103127387A 2014-08-08 2014-08-08 Method for filtering unsightly image from a batch of images TW201606706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW103127387A TW201606706A (en) 2014-08-08 2014-08-08 Method for filtering unsightly image from a batch of images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW103127387A TW201606706A (en) 2014-08-08 2014-08-08 Method for filtering unsightly image from a batch of images

Publications (1)

Publication Number Publication Date
TW201606706A true TW201606706A (en) 2016-02-16

Family

ID=55810101

Family Applications (1)

Application Number Title Priority Date Filing Date
TW103127387A TW201606706A (en) 2014-08-08 2014-08-08 Method for filtering unsightly image from a batch of images

Country Status (1)

Country Link
TW (1) TW201606706A (en)

Similar Documents

Publication Publication Date Title
TWI746674B (en) Type prediction method, device and electronic equipment for identifying objects in images
US9710928B2 (en) System and process for automatically finding objects of a specific color
JP5779720B2 (en) Image quality analysis for search
JP5409910B2 (en) Non-product image identification
WO2021164550A1 (en) Image classification method and apparatus
JP6529686B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
CN109903265B (en) Method and system for setting detection threshold value of image change area and electronic device thereof
WO2015036581A1 (en) Image processing
Li et al. Color constancy using achromatic surface
CN110956184A (en) Abstract diagram direction determination method based on HSI-LBP characteristics
US20240013530A1 (en) System and method for aggregating metadata for item identification using digital image processing
US20240020973A1 (en) System and method for capturing images for training of an item identification model
CN104376523B (en) A kind of image code false-proof system composing method towards Google glass
CN105740820B (en) Method and system for acquiring picture for discrimination
US11960569B2 (en) System and method for refining an item identification model based on feedback
US20220414398A1 (en) Database management system and method for updating a training dataset of an item identification model
TW201606706A (en) Method for filtering unsightly image from a batch of images
Faghih et al. Neural gray: A color constancy technique using neural network
JP7417574B2 (en) How to identify lip makeup products that appear in images
CN111127128A (en) Commodity recommendation method, commodity recommendation device and storage medium
KR102488953B1 (en) System for providing pre-owned luxury checking service using colorbook
Zhao et al. ReCC-GAN: scene global illuminant estimation network based on Retinex and generative adversarial network
CN116612375A (en) Article identification method, article identification device, storage medium and electronic equipment
Kaur et al. COLOR CONSTANCY ALGORITHMS: SIGNIFICANT STUDY
Zhang et al. Multi-histogram mapping and fusion based image contrast enhancement