svm web application

35 views
Skip to first unread message

nermeen alami

unread,
Dec 30, 2013, 10:16:36 AM12/30/13
to general-in...@googlegroups.com
Hello Everybody
I'm working on image classification system, i used sift and support vector machine. I want to make it a web application using java applet, How can i use SVM results to classify new images? Is there a 
formula for svm hyper plane that i can use? or anything else can be used to classify. actually i calculated the sift for all images and i want to have a web application that a user can browse an image from predefined images (which it's sift is calculated) and classify to see the results. PS: i did the training phase using MATLAB i just want the final decision for classification of new images.

Ivan Vodišek

unread,
Dec 30, 2013, 12:04:41 PM12/30/13
to general-in...@googlegroups.com
I've just wikied (I hate those read-ten-times-to-understand sentences from smart wikipedia) shortly tools U use and got this idea:

U can use just swift and some common sense reasoning. There is an optical character recognition technique U might want to use for picture recognition. The algorithm works like this: it scales the character bitmap to some small, say 10 x 10 matrix, then compares it to previously learned shape of a letter, again in 10 x 10 matrix bitmap (previously reduced bitmap which we explicitely identified as some letter). So, if we have only black and white colors, we can calculate matching pixels between character we want to recognize and learned character. If we reach higher than 90% black-white pixel match, the character is recognized.

Important thing is that swift gets us curved lines about a picture (like in edge detection app). So we can paint each curve on some low-resolution image (say 20 x 20) and compare it to previously learned data (some basic shapes filled into a database). This is how we can recognize parts of the picture separately (like circle here, triangle there).

So, how to recognize what entire picture represents? Again, we can reduce entire picture to, say 10 x 10 matrix, but this time we don't write a color to each cell, but recognized shape's ID instead. Then if we analyze a face, the output would be: two circles at the top for eyes, a triangle at the middle for a nose, some stuff at the bottom for a mouth and an ellipse around all of this for outline of a face. When we have positions of these elements reduced to 10 x 10 matrix, we can compare it with previously learned face representation. If it has all elements at same places, voilé, we have a face recognized.

I hope this helps 


2013/12/30 nermeen alami <nermee...@gmail.com>
Hello Everybody
I'm working on image classification system, i used sift and support vector machine. I want to make it a web application using java applet, How can i use SVM results to classify new images? Is there a 
formula for svm hyper plane that i can use? or anything else can be used to classify. actually i calculated the sift for all images and i want to have a web application that a user can browse an image from predefined images (which it's sift is calculated) and classify to see the results. PS: i did the training phase using MATLAB i just want the final decision for classification of new images.

--
You received this message because you are subscribed to the Google Groups "Genifer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to general-intellig...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Matt Mahoney

unread,
Dec 30, 2013, 4:33:57 PM12/30/13
to general-intelligence
I doubt it is possible to do much in the way of image classification
with the puny processors found in most smart phones. I would suggest a
review of Google's state of the art results, which still have a long
way to go to match human level vision.

http://arxiv.org/pdf/1112.6209.pdf

Google's system learned to recognize human faces, human bodies, and
cat faces. Humans can recognize about 100,000 distinct visual objects.

Google has a 15.2% accuracy on ImageNet, a 70% improvement over other
systems. Humans can recognize nearly all of the objects in ImageNet.

Google's system was trained on 10 million 200 by 200 still images.
Humans are trained on the equivalent of 100 billion video frames at
10000 by 10000 resolution.

Google's system recognizes only still, grayscale images in a
standalone system. Humans perceive color, motion, and stereoscopic
depth in a system integrated with language, hearing, motor movement
and feedback, and other sensory data, all of which provide important
context for visual recognition.

Google's system uses a 9 layer neural network with 10^9 connections.
The human brain has about 10^14 connections.

Google's system was trained for 3 days on 1000 16-core processors. A
human brain sized neural network is equivalent to several petaflops of
computation, trained for decades.

Google's vision architecture is fairly simple. The human genome has
the same information content as about 300 million lines of code.
--
-- Matt Mahoney, mattma...@gmail.com

Ivan Vodišek

unread,
Dec 31, 2013, 7:59:29 AM12/31/13
to general-in...@googlegroups.com
And yet OCR (optical character recognition) is done within seconds? I guess that slow part would be analyzing an image (with all translate/rotate/magnify filters). After that, results can be cached and reached fast. If U get 1 picture per 1 min I think U'll be lucky.


2013/12/30 Matt Mahoney <mattma...@gmail.com>

Ivan Vodišek

unread,
Dec 31, 2013, 8:15:45 AM12/31/13
to general-in...@googlegroups.com
and how about some optimization?

first U try recognition on some small scale factor, say 5 x 5 B/W pixels. if it matches, scale up the image to 10 x 10 and so on. Like U blur whole image and sharpen it, step by step.

I'd try it, this sounds promising to me. But, again, maybe this would be slow also?


2013/12/31 Ivan Vodišek <ivan....@gmail.com>

Ivan Vodišek

unread,
Dec 31, 2013, 8:26:38 AM12/31/13
to general-in...@googlegroups.com
And U don't need swift also (it's algorithm is patented after all).

Edges could be find by following algorithm:

Horizontal pass: check pixels, one by one in horizontal line, for how much next pixel differs from previous one. if it differs much, draw white pixel to resulting image. otherwise draw black one.

Vertical pass: again the same but now U check vertical lines.



2013/12/31 Ivan Vodišek <ivan....@gmail.com>

Matt Mahoney

unread,
Dec 31, 2013, 9:38:20 AM12/31/13
to general-intelligence
OCR is not human level vision. It is hard enough for OCR to read a
CAPTCHA. It cannot understand images or diagrams. OCR uses a
statistical language model to guess at ambiguous or noisy characters,
like to distinguish "l" from "I" or "1" or "|", but the general
problem is AI complete. You can fill in missing characters like "the
cat caught a mo_se" based on common sense knowledge about the world
that OCR lacks. So OCR always has a higher error rate.

Here are some test images you can try. http://mattmahoney.net/ocr/
YKY might still have some of the results. (Links are broken).

Ivan Vodišek

unread,
Dec 31, 2013, 11:14:18 AM12/31/13
to general-in...@googlegroups.com
Sorry, I don't give up.

Freaking shit is possible over here, only imagination is a limit. I've seen analog -> quantified graphics optimizations in my life I could never dream about (just think about jpeg compression and U'll know what I'm talking about. And there is even more examples).

I say that Google has done a lousy job with that slow neural networks and gray pictures. What a waste of processing power, sorry Matt.


2013/12/31 Matt Mahoney <mattma...@gmail.com>

SeH

unread,
Dec 31, 2013, 2:05:14 PM12/31/13
to general-in...@googlegroups.com
download.png

Matt Mahoney

unread,
Dec 31, 2013, 2:28:15 PM12/31/13
to general-intelligence
On Tue, Dec 31, 2013 at 11:14 AM, Ivan Vodišek <ivan....@gmail.com> wrote:
> I say that Google has done a lousy job with that slow neural networks and
> gray pictures. What a waste of processing power, sorry Matt.

So why hasn't anyone done better?


-- Matt Mahoney, mattma...@gmail.com

Ivan Vodišek

unread,
Dec 31, 2013, 2:40:15 PM12/31/13
to general-in...@googlegroups.com
>> I say that Google has done a lousy job with that slow neural networks and
>> gray pictures. What a waste of processing power, sorry Matt.
>
>So why hasn't anyone done better?

Bad idea they have, it is just mine opinion. And who says anyone hasn't, or will not. But it is difficult to break through over zillion dollars campaigns. So how to find the guy who did it, or will do it and make him famous?


2013/12/31 Matt Mahoney <mattma...@gmail.com>


-- Matt Mahoney, mattma...@gmail.com

Matt Mahoney

unread,
Dec 31, 2013, 2:44:08 PM12/31/13
to general-intelligence
On Tue, Dec 31, 2013 at 2:40 PM, Ivan Vodišek <ivan....@gmail.com> wrote:
>>> I say that Google has done a lousy job with that slow neural networks and
>>> gray pictures. What a waste of processing power, sorry Matt.
>>
>>So why hasn't anyone done better?
>
> Bad idea they have, it is just mine opinion. And who says anyone hasn't, or
> will not. But it is difficult to break through over zillion dollars
> campaigns. So how to find the guy who did it, or will do it and make him
> famous?

Maybe you will be the one to do it then? All you need is a computer
and a clever algorithm, right?

Ivan Vodišek

unread,
Dec 31, 2013, 2:51:05 PM12/31/13
to general-in...@googlegroups.com
I'm just saying that the guy wouldn't find us. Look at that forests (plural) when googling something. Freaking blade of grass in Amazon in the corner of the Universe, forgotten from God.

Me implementing it? It is on my to-do list with that clever encyclopedia i'm running for. I'm just not entirely clear how to make computer vision useful in a project like that. If U have an idea, shoot, I'm interested.


2013/12/31 Matt Mahoney <mattma...@gmail.com>
-- Matt Mahoney, mattma...@gmail.com

Ivan Vodišek

unread,
Dec 31, 2013, 4:04:50 PM12/31/13
to general-in...@googlegroups.com
just for the record, i'm not trolling, i mean *every* word I write. maybe sometimes a little awkward (to be misunderstood), but it comes in a package with me. i'm not perfect, sorry.


2013/12/31 Ivan Vodišek <ivan....@gmail.com>

Ivan Vodišek

unread,
Dec 31, 2013, 4:22:36 PM12/31/13
to general-in...@googlegroups.com
cross my heart


2013/12/31 Ivan Vodišek <ivan....@gmail.com>

Ivan Vodišek

unread,
Dec 31, 2013, 4:22:50 PM12/31/13
to general-in...@googlegroups.com
hope to die


2013/12/31 Ivan Vodišek <ivan....@gmail.com>

Ivan Vodišek

unread,
Dec 31, 2013, 4:23:50 PM12/31/13
to general-in...@googlegroups.com
blink, blink


2013/12/31 Ivan Vodišek <ivan....@gmail.com>

YKY (Yan King Yin, 甄景贤)

unread,
Jan 1, 2014, 5:41:52 AM1/1/14
to general-in...@googlegroups.com
Happy new year, I am still in holiday mood... I am looking up and learning about SIFT, so I may give my comments later... =)

--
YKY
"The ultimate goal of mathematics is to eliminate any need for intelligent thought" -- Alfred North Whitehead

Ivan Vodišek

unread,
Jan 1, 2014, 3:28:50 PM1/1/14
to general-in...@googlegroups.com
I've decided to give it a try right now. It would be nice thing to explain situations with text + pictures, needed for smartpedia. So, I'm resting from Synth programming language for two months, to start ptogramming computer vision...

Like Terminator sad: "I'll be back"


2014/1/1 YKY (Yan King Yin, 甄景贤) <generic.in...@gmail.com>

--

SeH

unread,
Jan 4, 2014, 1:12:03 PM1/4/14
to general-in...@googlegroups.com
NuPIC @ http://numenta.org/ seems to be able to do arbitrary vision processing. not sure if it includes saccade "emulation" like SIFT or something else. 

 "Open"Cog has a competing "product" called DeSTIN which I haven't used.  it is implemented with CUDA which is a proprietary platform by NVidia when they could have chosen the non-hypocritical "Open" OpenCL.  they made a similar ideological violation when choosing the commercial Unity3D engine for a simulation environment.

Matt Mahoney

unread,
Jan 4, 2014, 2:25:21 PM1/4/14
to general-intelligence
AFAIK DeSTIN has not demonstrated any vision capabilities beyond
recognizing single handwritten digits when it was developed several
years ago. It has yet to be integrated into OpenCog. I think CUDA
could accelerate the lower layers of a deep neural network, but I
don't think that GPUs have enough memory to implement the upper layers
for detecting more complex features.
-- Matt Mahoney, mattma...@gmail.com

SeH

unread,
Jan 4, 2014, 2:29:44 PM1/4/14
to general-in...@googlegroups.com
https://github.com/opencog/destin


when opencog sold out to the chinese government / military i suspected it was a coordinated multinational distraction to discourage amateur AGI development. 

meanwhile... here's DARPA's report from last year, recently released:

Matt Mahoney

unread,
Jan 4, 2014, 3:44:58 PM1/4/14
to general-intelligence
On Sat, Jan 4, 2014 at 2:29 PM, SeH <seh...@gmail.com> wrote:
> https://github.com/opencog/destin

The first 2 papers from 2009 and 2011 describes what DeSTIN does. It
recognizes low resolution images of the letters "A", "B", "C" in the
first, and digits in the second. The remaining papers describe OpenCog
and what DeSTIN might do in the future.

I have been lurking on the OpenCog list for a few years. They really
lack the resources to build AGI in terms of computing hardware,
manpower, and dollars, but they keep plugging away on a big piece of
software that is a bear to install, and is still a long way from doing
anything interesting. Their funding is mostly from side work doing
game development. I don't see them doing any significant research in
hard problems like language, vision, or robotics. OpenCog is more like
a programming language for someone else to fill with knowledge and
rules to build an AGI. Sorry if I don't see that happening anytime
soon.

SeH

unread,
Jan 4, 2014, 3:58:47 PM1/4/14
to general-in...@googlegroups.com
http://www.aidyia.com/team/ i wonder if this site is a joke or not



Matt Mahoney

unread,
Jan 4, 2014, 4:29:46 PM1/4/14
to general-intelligence
If they can use AI to predict financial markets, then why are they
telling anyone?

SeH

unread,
Jan 4, 2014, 4:55:01 PM1/4/14
to general-in...@googlegroups.com
because fiat money itself is a scam just like aidyia

http://curiosume.org/ <- short video explains core flaws in capitalism

Screenshot from 2014-01-04 10:21:05.png
Screenshot from 2014-01-04 10:08:11.png

Linas Vepstas

unread,
Jan 5, 2014, 12:32:13 AM1/5/14
to general-in...@googlegroups.com
On 4 January 2014 13:29, SeH <seh...@gmail.com> wrote:
when opencog sold out to the chinese government / military i suspected it was a coordinated multinational distraction to discourage amateur AGI development. 

SeH that's wrong & absurd. You're a smart guy, don't say dumb things like that.

--linas 

Linas Vepstas

unread,
Jan 5, 2014, 12:42:24 AM1/5/14
to general-in...@googlegroups.com
Hi Matt,

I'll bite my lip mostly, other than to say I do have a language-learning proposal circulating, trying to get funding. I was planning on posting a variant of it to arxiv tomorrow(!)  Personally, I think its a great idea (the language learning proposal) ...

Re side-work. I've been involved in some of it, and what outsiders believe that A(G)I can do or not do is sharply disconnected from reality.  (Mostly, they think its far more advanced than it is,).  This disconnect is an impediment to progress, because it makes rational discussion hard .. it turns into strange sci-fi world quickly enough.

--linas


SeH

unread,
Jan 5, 2014, 1:08:17 AM1/5/14
to general-in...@googlegroups.com
its plausible and possible.  you're denial does nothing to lessen my suspicion. 

actually i'm very very stupid and i will continue to spout nonsense


SeH

unread,
Jan 5, 2014, 1:15:30 AM1/5/14
to general-in...@googlegroups.com

Matt Mahoney

unread,
Jan 6, 2014, 10:58:00 AM1/6/14
to general-intelligence
On Sun, Jan 5, 2014 at 12:42 AM, Linas Vepstas <linasv...@gmail.com> wrote:
> Hi Matt,
>
> I'll bite my lip mostly, other than to say I do have a language-learning
> proposal circulating, trying to get funding. I was planning on posting a
> variant of it to arxiv tomorrow(!) Personally, I think its a great idea
> (the language learning proposal) ...

Let me know when you post it. Of course results are more interesting
than a proposal. But I understand AGI is a really hard problem. I
don't mean to be critical because I know the OpenCog group is working
hard to make it happen. But how can you compete with Google?

Linas Vepstas

unread,
Jan 11, 2014, 10:45:22 PM1/11/14
to general-in...@googlegroups.com
On 6 January 2014 09:58, Matt Mahoney <mattma...@gmail.com> wrote:
On Sun, Jan 5, 2014 at 12:42 AM, Linas Vepstas <linasv...@gmail.com> wrote:
> Hi Matt,
>
> I'll bite my lip mostly, other than to say I do have a language-learning
> proposal circulating, trying to get funding. I was planning on posting a
> variant of it to arxiv tomorrow(!)  Personally, I think its a great idea
> (the language learning proposal) ...

Let me know when you post it.

"Real soon now". I'm trying to polish it a bit.
 
Of course results are more interesting
than a proposal. But I understand AGI is a really hard problem. I
don't mean to be critical because I know the OpenCog group is working
hard to make it happen. But how can you compete with Google?

Whatever google builds will be proprietary.  Same for IBM.  OpenCog is ope-source -- more -- its libre in the FSF sense.

--linas 
 

Ivan Vodišek

unread,
Feb 6, 2014, 4:08:15 PM2/6/14
to general-in...@googlegroups.com
computer vision - not finished yet, it just fids edges: http://synth.wink.ws/vision/

now i have to compare miniature images to segments of actual photos


2014-01-12 Linas Vepstas <linasv...@gmail.com>:

--

YKY (Yan King Yin, 甄景贤)

unread,
Feb 8, 2014, 9:28:40 AM2/8/14
to general-in...@googlegroups.com
On Fri, Feb 7, 2014 at 5:08 AM, Ivan Vodišek <ivan....@gmail.com> wrote:
computer vision - not finished yet, it just fids edges: http://synth.wink.ws/vision/

now i have to compare miniature images to segments of actual photos


That looks very nice -- I'm glad you're making progress and experimenting with many things =)

I think the trick of comparing images at different scales ​​is inadequate for genuine object recognition.  I guess impatience with AI drives many people to try simple tricks like that, but they fail =)

The reasonable route to take is to break down the image into small features (that are made up of pixels), and proceed ground-up.  (But this is also aided by structural knowledge from the top-down).

YKY (Yan King Yin, 甄景贤)

unread,
Feb 8, 2014, 9:41:53 AM2/8/14
to general-in...@googlegroups.com
On Mon, Dec 30, 2013 at 11:16 PM, nermeen alami <nermee...@gmail.com> wrote:
Hello Everybody
I'm working on image classification system, i used sift and support vector machine. I want to make it a web application using java applet, How can i use SVM results to classify new images? Is there a 
formula for svm hyper plane that i can use? or anything else can be used to classify. actually i calculated the sift for all images and i want to have a web application that a user can browse an image from predefined images (which it's sift is calculated) and classify to see the results. PS: i did the training phase using MATLAB i just want the final decision for classification of new images.


Nermeen,

Sorry about the delay -- 2 months late =]

Object recognition is a very difficult task, in its most general form.  If you only aim to recognize a limited number of objects, then SVM may be of help, otherwise I think a more complex theory is needed.

SVM works by defining the distance metric between data points.  I'm not sure why you need to worry about the hyperplane exactly.

For example if you want to classify cats and dogs, you need to define the distance between cats and dogs images, whose labels are supplied by users.

If the objects are more complex than that, it may be difficult to solve using SIFT + SVM only...
Reply all
Reply to author
Forward
0 new messages