CN102722520A - Method for classifying pictures by significance based on support vector machine - Google Patents
Method for classifying pictures by significance based on support vector machine Download PDFInfo
- Publication number
- CN102722520A CN102722520A CN201210091896XA CN201210091896A CN102722520A CN 102722520 A CN102722520 A CN 102722520A CN 201210091896X A CN201210091896X A CN 201210091896XA CN 201210091896 A CN201210091896 A CN 201210091896A CN 102722520 A CN102722520 A CN 102722520A
- Authority
- CN
- China
- Prior art keywords
- picture
- pictures
- webpage
- web page
- important
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to a method for classifying pictures by significance, wherein the pictures are on web pages whose content can be accessed without obstacles. The method is characterized in that part of web pages are captured from the internet to establish training data; that as to every picture in each web page, space features and structure features of the picture which can represent the picture formally are extracted, and a significance class label is marked artificially on the picture according to functions of the picture in the web page; that acquired picture feature data and corresponding class labels are trained to form a classifier through support vector machine algorithm; and that pending web pages are captured, space features and structure features of all pictures on the web page are extracted, and the pictures are classified into significant class and insignificant class by the trained classifier. The method is advantageous in that pictures which are significant to the visually disabled can be selected and that substitution texts can be selectively provided for the significant pictures, which is convenient for the visually disabled to acquire picture information on the web pages.
Description
Technical field
The present invention relates to the technical field of accessible detection of webpage and remodeling method, particularly based on the picture classifying importance method of SVMs.
Background technology
According to whole nation disabled person's sample survey second time result in 2006, China had 1,233 ten thousand people with visual disabilities now, and they are colonies that particular difficulty goes up in society., along with the height of internet is popularized and the internet continuous rising of importance in daily life, the accessible access problem of people's with visual disabilities info web becomes the important content of the accessible building-up work of China's information.People with visual disabilities is because the health obstacle, and the content on can't the normal reading webpage is so its indulging in the internet is outstanding especially.People with visual disabilities uses usually and reads to shield the softward interview web page contents.Reading to shield software helps the disabled person and obtains information through the text message on the webpage being converted into voice.For the picture on the webpage, read to shield the alternative textual description that is comprised in ALT attribute, LONGDESC attribute or the picture header of software through the picture in the html document < IMG>label, come to describe image content to user with visual disabilities.Increasing picture on the existing webpage, promoted the twenty-twenty vision user surf the Net experience in, but give the people's with visual disabilities more obstacle of web page contents visit the interpolation.
Be not that all pictures all need substitute textual description in the webpage.Understanding to web page contents in the webpage is important with the relevant picture of navigation, and suitable alternative text need be provided.In addition, also have many picture right and wrong that are used to promote webpage visual effect or structure of web page important on the webpage, empty alternative text should be provided, otherwise can disturb people's with visual disabilities information to obtain.Therefore coming that through a kind of method the picture on the webpage is carried out classifying importance seems particularly important.
At present, in fields such as machine learning, the research of sorting algorithm is reached its maturity.Picture in the webpage is extracted characteristic; And the method that marks with manual work is ready to training dataset; Adopt the method for existing SVMs in the machine learning to obtain a sorter afterwards, just can picture be carried out classifying importance at last through the sorter that obtains from the SVMs training according to training data.
Summary of the invention
In order to distinguish important picture and the non-important picture on the webpage; Thereby only alternative text is provided for important picture; Make people with visual disabilities can obtain the information on the webpage better, the present invention proposes a kind of picture classifying importance method based on SVMs, this method may further comprise the steps:
1, the Web page picture classifying importance method of the accessible visit of a kind of object web page content, the step of this method is following:
1) grasps some webpages, the picture in the locating web-pages from the internet;
2) Web page picture that step 1) is obtained extracts space characteristics and architectural feature, to its importance classes label of the artificial mark of every pictures, all pictures is divided into important and non-important two types, obtains training data;
3) utilize algorithm of support vector machine, on training data, train a sorter;
4) grasp the webpage that will carry out picture classification from the internet; All pictures on the webpage extract its space characteristics and architectural feature equally; Use the sorter that obtains in the step 3), the importance of predicted pictures is divided into important and non-important two types to the picture on the webpage according to this.
2, the picture described in the step 1) comprises:
1) <img>element in the webpage;
2) < object>and < embed>element that has vision to appear;
3) comprise the background picture attribute, content is empty node.
3, the space characteristics step 2) comprises:
1) picture is with respect to the relative width nw of screen, and just the ratio of picture width and screen width when ratio surpasses 1, directly gets 1 as width normalization characteristic, and final computing formula is following:
Wherein iw is the picture width, and sw is a screen width;
2) picture is with respect to the relative height nh of screen, and just the ratio of picture height and screen height when ratio surpasses 1, directly gets 1 as height normalization characteristic, and final computing formula is following:
Wherein ih is the picture height, and sh is a screen height;
3) the lateral attitude nlo of picture in webpage is the horizontal relative position of center picture in screen, and computing formula is:
Wherein lo is the distance of the left frame of picture left frame and webpage;
4) the relative distance nto of picture and page top, computing formula is:
Wherein to is the distance of picture upper side frame and page top;
5) the relative distance nbo of the picture and page bottom, computing formula is:
Wherein bo is the distance of picture lower frame and page bottom.
4, the architectural feature step 2) comprises:
1) arranged side by side picture number n lc, i.e. the number of picture in the set of pictures of photo current place, a group of promptly existing in the webpage is identical with the photo current length and width, and with laterally, the number of the picture arranged of mode vertical or form; Need numerical value be normalized to [0,1] interval, computing formula is:
nlc=1-0.5
lc-1
Wherein lc is the picture number of photo current place set of pictures;
2) the link quality characteristic of picture divides three kinds of situation to consider, if picture is a link; And in webpage, have the text link that points to same address, then this eigenwert is 0, if picture is not link; Then this eigenwert is 0.5; If picture is a link, and in same webpage, do not have the text link that points to same address, then this eigenwert is 1;
3) the picture heel is counted nwc with the speech of text, also is divided into two kinds of situation, if picture is a link, it is 0.5 that eigenwert then is set, otherwise calculates by following formula:
nwc=1-0.5
wc
Wherein wc is the speech number of picture followed with text;
4) area of picture place webpage hyperlink content accounts for the proportion nna of page all the elements area, and computing formula is following:
Wherein na is a web page interlinkage content area, and ca is the area of page all the elements.
5, the said algorithm of support vector machine training process of step 3) is following:
1) given training data { (x
1, y
1), (x
2, y
2) ..., (x
n, y
n), x wherein
iBe the space characteristics of i pictures and the vector that architectural feature is formed, y
iBe the class label of i pictures, when promptly picture is important, y
iBe 1, otherwise y
iBe-1, parameters C of using in the selected algorithm and γ;
2) maximization is about α=(α
1, α
2..., α
n)
Function is tried to achieve
The value of α when reaching maximum, need use this value in the time of classification:
Guarantee following constraint condition establishment simultaneously:
0≤α
1≤C
Wherein C is a parameter selected in the step 1), k (x
i, x
j) be kernel function, what adopt here is gaussian kernel function, expression formula is:
k(x
i,x
j)=exp?(-γ||x
i-x
j||
2)
γ is a parameter selected in the step 1), the radial effect scope of control gaussian kernel function;
3) calculate b:
B is the intercept on classification plane, can use the value of the b that obtains in the follow-up assorting process here.
6, the said sorter assorting process of step 4) is following:
1) utilize variable α and the b that tries to achieve in the training process, the proper vector x of every picture to be classified calculated following decision function f (x):
The sgn function is a sign function, and expression formula is following:
2) when the value of decision function f (x) is+1, then corresponding picture is assigned to important one type, when the decision function value is-1, corresponding picture is assigned to non-important one type.
The present invention proposes picture classifying importance method based on SVMs; Its advantage is: can from webpage, filter out picture important concerning the visual disability people;, make things convenient for the visual disability people to obtain info web and lay the first stone optionally for important picture provides alternative text at the back.This method is applicable to all types of webpages, need not the backstage and classifies.
Description of drawings
Fig. 1 is a method flow diagram of the present invention.
Embodiment
1, the Web page picture classifying importance method of the accessible visit of a kind of object web page content, the step of this method is following:
1) grasps some webpages, the picture in the locating web-pages from the internet;
2) Web page picture that step 1) is obtained extracts space characteristics and architectural feature, to its importance classes label of the artificial mark of every pictures, all pictures is divided into important and non-important two types, obtains training data;
3) utilize algorithm of support vector machine, on training data, train a sorter;
4) grasp the webpage that will carry out picture classification from the internet; All pictures on the webpage extract its space characteristics and architectural feature equally; Use the sorter that obtains in the step 3), the importance of predicted pictures is divided into important and non-important two types to the picture on the webpage according to this.
2, the picture described in the step 1) comprises:
1) <img>element in the webpage;
2) < object>and < embed>element that has vision to appear;
3) comprise the background picture attribute, content is empty node.
3, the space characteristics step 2) comprises:
1) picture is with respect to the relative width nw of screen, and just the ratio of picture width and screen width when ratio surpasses 1, directly gets 1 as width normalization characteristic, and final computing formula is following:
Wherein iw is the picture width, and sw is a screen width;
2) picture is with respect to the relative height nh of screen, and just the ratio of picture height and screen height when ratio surpasses 1, directly gets 1 as height normalization characteristic, and final computing formula is following:
Wherein ih is the picture height, and sh is a screen height;
3) the lateral attitude nlo of picture in webpage is the horizontal relative position of center picture in screen, and computing formula is:
Wherein lo is the distance of the left frame of picture left frame and webpage;
4) the relative distance nto of picture and page top, computing formula is:
Wherein to is the distance of picture upper side frame and page top;
5) the relative distance nbo of the picture and page bottom, computing formula is:
Wherein bo is the distance of picture lower frame and page bottom.
4, the architectural feature step 2) comprises:
1) arranged side by side picture number n lc, i.e. the number of picture in the set of pictures of photo current place, a group of promptly existing in the webpage is identical with the photo current length and width, and with laterally, the number of the picture arranged of mode vertical or form; Need numerical value be normalized to [0,1] interval, computing formula is:
nlc=1-0.5
lc-1
Wherein lc is the picture number of photo current place set of pictures;
2) the link quality characteristic of picture divides three kinds of situation to consider, if picture is a link; And in webpage, have the text link that points to same address, then this eigenwert is 0, if picture is not link; Then this eigenwert is 0.5; If picture is a link, and in same webpage, do not have the text link that points to same address, then this eigenwert is 1;
3) the picture heel is counted nwc with the speech of text, also is divided into two kinds of situation, if picture is a link, it is 0.5 that eigenwert then is set, otherwise calculates by following formula:
nwc=1-0.5
wc
Wherein wc is the speech number of picture followed with text;
4) area of picture place webpage hyperlink content accounts for the proportion nna of page all the elements area, and computing formula is following:
Wherein na is a web page interlinkage content area, and ca is the area of page all the elements.
5, the said algorithm of support vector machine training process of step 3) is following:
1) given training data { (x
1, y
1), (x
2, y
2) ..., (x
n, y
n), x wherein
iBe the space characteristics of i pictures and the vector that architectural feature is formed, y
iBe the class label of i pictures, when promptly picture is important, y
iBe 1, otherwise y
iBe-1, parameters C of using in the selected algorithm and γ;
2) maximization is about α=(α
1, α
2..., α
n)
Function is tried to achieve
The value of α when reaching maximum, need use this value in the time of classification:
Guarantee following constraint condition establishment simultaneously:
0≤α
1≤C
Wherein C is a parameter selected in the step 1), k (x
i, x
j) be kernel function, what adopt here is gaussian kernel function, expression formula is:
k(x
i,x
j)=exp(-γ||x
i-x
j||
2)
γ is a parameter selected in the step 1), the radial effect scope of control gaussian kernel function;
3) calculate b:
B is the intercept on classification plane, can use the value of the b that obtains in the follow-up assorting process here.
6, the said sorter assorting process of step 4) is following:
1) utilize variable α and the b that tries to achieve in the training process, the proper vector x of every picture to be classified calculated following decision function f (x):
The sgn function is a sign function, and expression formula is following:
2) when the value of decision function f (x) is+1, then corresponding picture is assigned to important one type, when the decision function value is-1, corresponding picture is assigned to non-important one type.
The described content of this instructions embodiment only is enumerating the way of realization of inventive concept; Should not being regarded as of protection scope of the present invention only limits to the concrete form that embodiment states, protection scope of the present invention also reach in those skilled in the art conceive according to the present invention the equivalent technologies means that can expect.
Claims (6)
1. the Web page picture classifying importance method of the accessible visit of an object web page content the method is characterized in that:
1) grasps webpage, the picture in the locating web-pages from the internet;
2) Web page picture that step 1) is obtained extracts space characteristics and architectural feature, to its importance classes label of the artificial mark of every pictures, all pictures is divided into important and non-important two types, obtains training data;
3) utilize algorithm of support vector machine, on training data, train a sorter;
4) grasp the webpage that will carry out picture classification from the internet; All pictures on the webpage extract its space characteristics and architectural feature equally; Use the sorter that obtains in the step 3), the importance of predicted pictures is divided into important and non-important two types to the picture on the webpage according to this.
2. the Web page picture classifying importance method of the accessible visit of object web page content as claimed in claim 1, it is characterized in that: the picture described in the described step 1) comprises:
1) <img>element in the webpage;
2) < object>and < embed>element that has vision to appear;
3) comprise the background picture attribute, content is empty node.
3. the Web page picture classifying importance method of the accessible visit of object web page content as claimed in claim 1, it is characterized in that: the space characteristics described step 2) comprises:
1) picture is with respect to the relative width nw of screen, and just the ratio of picture width and screen width when ratio surpasses 1, directly gets 1 as width normalization characteristic, and final computing formula is following:
Wherein iw is the picture width, and sw is a screen width;
2) picture is with respect to the relative height nh of screen, and just the ratio of picture height and screen height when ratio surpasses 1, directly gets 1 as height normalization characteristic, and final computing formula is following:
Wherein ih is the picture height, and sh is a screen height;
3) the lateral attitude nlo of picture in webpage is the horizontal relative position of center picture in screen, and computing formula is:
Wherein lo is the distance of the left frame of picture left frame and webpage;
4) the relative distance nto of picture and page top, computing formula is:
Wherein to is the distance of picture upper side frame and page top;
5) the relative distance nbo of the picture and page bottom, computing formula is:
Wherein bo is the distance of picture lower frame and page bottom.
4. the picture classifying importance method of the accessible visit of object web page content as claimed in claim 1, it is characterized in that: the architectural feature described step 2) comprises:
1) arranged side by side picture number n lc, i.e. the number of picture in the set of pictures of photo current place, a group of promptly existing in the webpage is identical with the photo current length and width, and with laterally, the number of the picture arranged of mode vertical or form; Need numerical value be normalized to [0,1] interval, computing formula is:
nlc=1-0.5
lc-1
Wherein lc is the picture number of photo current place set of pictures;
2) the link quality characteristic of picture divides three kinds of situation to consider, if picture is a link; And in webpage, have the text link that points to same address, then this eigenwert is 0, if picture is not link; Then this eigenwert is 0.5; If picture is a link, and in same webpage, do not have the text link that points to same address, then this eigenwert is 1;
3) the picture heel is counted nwc with the speech of text, also is divided into two kinds of situation, if picture is a link, it is 0.5 that eigenwert then is set, otherwise calculates by following formula:
nwc=1-0.5
wc
Wherein wc is the speech number of picture followed with text;
4) area of picture place webpage hyperlink content accounts for the proportion nna of page all the elements area, and computing formula is following:
Wherein na is a web page interlinkage content area, and ca is the area of page all the elements.
5. the picture classifying importance method of the accessible visit of object web page content as claimed in claim 1 is characterized in that: the said algorithm of support vector machine training process of step 3) is following:
1) given training data { (x
1, y
1), (x
2, y
2) ..., (x
n, y
n), x wherein
iBe the space characteristics of i pictures and the vector that architectural feature is formed, y
iBe the class label of i pictures, when promptly picture is important, y
iBe 1, otherwise y
iBe-1, parameters C of using in the selected algorithm and γ;
2) maximization is about α=(α
1, α
2..., α
n)
Function is tried to achieve
The value of α when reaching maximum, need use this value in the time of classification:
Guarantee following constraint condition establishment simultaneously:
0≤α
1≤C
Wherein C is a parameter selected in the step 1), k (x
i, x
j) be kernel function, what adopt here is gaussian kernel function, expression formula is:
k(x
i,x
j)=exp(-γ||x
i-x
j||
2)
γ is a parameter selected in the step 1), the radial effect scope of control gaussian kernel function;
3) calculate b:
B is the intercept on classification plane, can use the value of the b that obtains in the follow-up assorting process here.
6. the picture classifying importance method of the accessible visit of object web page content as claimed in claim 1 is characterized in that: the said sorter assorting process of step 4) is following:
1) utilize variable α and the b that tries to achieve in the training process, the proper vector x of every picture to be classified calculated following decision function f (x):
The sgn function is a sign function, and expression formula is following:
2) when the value of decision function f (x) is+1, then corresponding picture is assigned to important one type, when the decision function value is-1, corresponding picture is assigned to non-important one type.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210091896XA CN102722520A (en) | 2012-03-30 | 2012-03-30 | Method for classifying pictures by significance based on support vector machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210091896XA CN102722520A (en) | 2012-03-30 | 2012-03-30 | Method for classifying pictures by significance based on support vector machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102722520A true CN102722520A (en) | 2012-10-10 |
Family
ID=46948281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210091896XA Pending CN102722520A (en) | 2012-03-30 | 2012-03-30 | Method for classifying pictures by significance based on support vector machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102722520A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095227A (en) * | 2014-04-28 | 2015-11-25 | 小米科技有限责任公司 | Method and apparatus for preloading webpage |
CN106484913A (en) * | 2016-10-26 | 2017-03-08 | 腾讯科技(深圳)有限公司 | Method and server that a kind of Target Photo determines |
WO2018176195A1 (en) * | 2017-03-27 | 2018-10-04 | 中国科学院深圳先进技术研究院 | Method and device for classifying indoor scene |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050105794A1 (en) * | 2003-08-25 | 2005-05-19 | Glenn Fung | Greedy support vector machine classification for feature selection applied to the nodule detection problem |
CN1920820A (en) * | 2006-09-14 | 2007-02-28 | 浙江大学 | Image meaning automatic marking method based on marking significance sequence |
CN101853388A (en) * | 2009-04-01 | 2010-10-06 | 中国科学院自动化研究所 | Unchanged view angle behavior identification method based on geometric invariable |
-
2012
- 2012-03-30 CN CN201210091896XA patent/CN102722520A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050105794A1 (en) * | 2003-08-25 | 2005-05-19 | Glenn Fung | Greedy support vector machine classification for feature selection applied to the nodule detection problem |
CN1920820A (en) * | 2006-09-14 | 2007-02-28 | 浙江大学 | Image meaning automatic marking method based on marking significance sequence |
CN101853388A (en) * | 2009-04-01 | 2010-10-06 | 中国科学院自动化研究所 | Unchanged view angle behavior identification method based on geometric invariable |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095227A (en) * | 2014-04-28 | 2015-11-25 | 小米科技有限责任公司 | Method and apparatus for preloading webpage |
CN105095227B (en) * | 2014-04-28 | 2019-03-26 | 小米科技有限责任公司 | The method and device that webpage preloads |
CN106484913A (en) * | 2016-10-26 | 2017-03-08 | 腾讯科技(深圳)有限公司 | Method and server that a kind of Target Photo determines |
WO2018176195A1 (en) * | 2017-03-27 | 2018-10-04 | 中国科学院深圳先进技术研究院 | Method and device for classifying indoor scene |
US11042777B2 (en) | 2017-03-27 | 2021-06-22 | Shenzhen Institutes Of Advanced Technology | Classification method and classification device of indoor scene |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107193959B (en) | Pure text-oriented enterprise entity classification method | |
CN110287960A (en) | The detection recognition method of curve text in natural scene image | |
CN104239485B (en) | A kind of dark chain detection method in internet based on statistical machine learning | |
CN102332028B (en) | Webpage-oriented unhealthy Web content identifying method | |
CN109635694B (en) | Pedestrian detection method, device and equipment and computer readable storage medium | |
CN103077389B (en) | A kind of combination character level classification and character string level classification text detection and recognition methods | |
CN109146892A (en) | A kind of image cropping method and device based on aesthetics | |
CN108804512A (en) | Generating means, method and the computer readable storage medium of textual classification model | |
CN104142995B (en) | The social event recognition methods of view-based access control model attribute | |
US7937338B2 (en) | System and method for identifying document structure and associated metainformation | |
EP3819859A1 (en) | Sky filter method for panoramic images and portable terminal | |
CN109598224A (en) | Recommend white blood cell detection method in the Sections of Bone Marrow of convolutional neural networks based on region | |
DE202011110876U1 (en) | Identifying plants in images | |
CN108199951A (en) | A kind of rubbish mail filtering method based on more algorithm fusion models | |
CN105868758A (en) | Method and device for detecting text area in image and electronic device | |
CN107391675A (en) | Method and apparatus for generating structure information | |
JPWO2015025704A1 (en) | Video processing apparatus, video processing method, and video processing program | |
CN106021383A (en) | Method and device for computing similarity of webpages | |
CN112528997A (en) | Tibetan-Chinese bilingual scene text detection method based on text center region amplification | |
CN106203510A (en) | A kind of based on morphological feature with the hyperspectral image classification method of dictionary learning | |
CN108804472A (en) | A kind of webpage content extraction method, device and server | |
CN102722520A (en) | Method for classifying pictures by significance based on support vector machine | |
CN106326451A (en) | Method for judging webpage sensing information block based on visual feature extraction | |
Alahmadi et al. | Enhancing object detection for vips using yolov4_resnet101 and text-to-speech conversion model | |
CN105938547B (en) | A kind of papery Water Year Book digitizing solution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20121010 |