Implementing Neural Network in the Paint replacement app

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

ROSFan
Posts: 268
Joined: Thu Apr 06, 2006 2:09 pm
Location: Germany

Implementing Neural Network in the Paint replacement app

Post by ROSFan »

How about implementing a very unique function in the paint replacement app which allows to double the size of a image without blurring it and keep it sharp using Neuronal Network. Maybe it could be a very good way to make ROS better known. This example is absolutely REAL. I made it with an freeware (but not opensource) program. If you don't believe me you can send me your own images:

Here is a png file found on google (keyword: people):
[ external image ]

This is a "standard" bicubic Interpolation of the image:
[ external image ]

And this is my result (i.e. compare the shoes):
[ external image ]

If I learn the (very complicated) algorithm, maybe I can make it even better optimizing the Network to image resizing. But maybe somebody else has the experience to write it opensource...

edit: This NN was optimized for reach detail landscapes. It is not the best possible result.
Last edited by ROSFan on Wed Aug 15, 2007 11:56 pm, edited 3 times in total.

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

Would you share the binaries for testing:) :twisted:

Matthias
Posts: 496
Joined: Tue Dec 27, 2005 12:43 am

Post by Matthias »

While your program might be interesting, I believe it's out of ReactOS's scope. Why don't you just start a sourceforge project or contribute to another OS project, such as ImageMagick?

Radhad
Posts: 605
Joined: Wed Apr 12, 2006 5:09 pm
Contact:

Post by Radhad »

What's the name of that software? This is a tool I would need for a lot of pictures.

ROSFan
Posts: 268
Joined: Thu Apr 06, 2006 2:09 pm
Location: Germany

Post by ROSFan »

fitswork

http://people.freenet.de/JDierks/softw.htm

But it is only in German and you must learn to using it.
How do I start an Sourceforge project? Does it cost something?
This time I have learn first to understand the algorithm. I'm C beginner and Information Technology Student (I hope it is the right name in english) and began to study 5 months ago.

This picture is a result of 3 NN Filters.

edit: Maybe I'll write an short Howto and Upload the NN Files for you (if you want). I trained them over 2 days.

forart
Posts: 1050
Joined: Mon Nov 29, 2004 1:36 pm
Location: Italy
Contact:

Post by forart »

Well, there are some interesting links to open paint replacement in my 3ad, but the most important could be this one:
forart wrote:I just discovered that last year Winlibre (thanks to SoC) bringed us another little baby: Final Touch
Presentation wrote:Final Touch is an image manipulation tool developped by Noemi Tojzan for the Google Summer of Code program.
.
.
Download Final Touch (555kb) Now !
The interesting thing is that seems that this year they're looking for collaboration for improving it:
Final Touch 2 wrote:During 2005’s summer of code Noemi Tojzan developed Final Touch, an MS Windows image manipulation program (written in Delphi) with innovative and hi quality algorithms. We would like someone to continue this effort and, using what has already been done by Noemi, build a :

* Image&Photo managing/processing app
* Multi-OS
* Easy to Use GUI
* Image Browser
* Raw file conversion (idea)
* suggested programming language/framework : pyGTK / Python
Maybe an opportunity to get SoC efforts from a side-street ?
Last but not least, this "magnification" algorithm is really interesting, i think that Avery Lee (the well-known VirtualDub and VGAPaint author) could be interested in a collaboration...
»Forward Agency NPO
In progress we (always) trust.

ROSFan
Posts: 268
Joined: Thu Apr 06, 2006 2:09 pm
Location: Germany

Post by ROSFan »

Here is a short howto:

First you resize the image with this two filters:
Bearbeiten->Bildgeometrie->Bildgröße x2 NN

http://www.seanserver.com/~againstgates ... anczos.nnw
http://www.seanserver.com/~againstgates ... nn/box.nnw

Then you merge these two results
Bearbeiten->Bild kombinieren mit manueller Verschiebung->OK

And this result you filter with the universal NN Filter
Bearbeiten->Spezielle Filter->Universeller Filter (Neuronales Netzwerk)
http://www.seanserver.com/~againstgates ... rpenit.nnf

If you want, you can do it twice using this file, but there is no more big difference after this:
http://www.seanserver.com/~againstgates ... penit1.nnf

edit: Final Touch is an interesting program but first I have to learn the basics about NN. It can take some time because there is a difference between beeing able to write the algorithm down and to understand them. Only if I can understand the mathematical background I can optimize it for a specific aim. Just read this article to get a (small) overview:
http://en.wikipedia.org/wiki/Neural_network
Last edited by ROSFan on Wed Aug 15, 2007 11:57 pm, edited 2 times in total.

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

Why use complex neural networks when there are also algorithms that do the job better and faster? ;)

[ external image ]
It compiles, let's ship it!

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

MF: compare the sharpness of your image, with the one processed by NN algorithm.

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

Haos wrote:MF: compare the sharpness of your image, with the one processed by NN algorithm.
Yes, my image has preserved local contrast and his image has enhanced local contrast, your point is? Increasing local contrast improves the percieved acuity of the image but it always looks artificial and in most cases ugly.

Now compare these two images and tell me again which one looks better:

[ external image ]

Of course, if you insist on increased local contrast, I can also do this:
[ external image ]
It compiles, let's ship it!

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos »

I`m not analyzing those images, only doing the visual comparison. And i beg to differ in opinion.

ROSFan
Posts: 268
Joined: Thu Apr 06, 2006 2:09 pm
Location: Germany

Post by ROSFan »

Well, your method has more disadvantages than advantages in my opinion. The biggest one is the "fur effect" in rich detail areas and bright disturbing pixels. It's very eye catching.
What program did you use? I have an Idea to combine both Methods. Hope it was free software. Is there free software using your algorithm?
[ external image ]
Last edited by ROSFan on Wed Aug 15, 2007 11:57 pm, edited 2 times in total.

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf »

ROSFan wrote:Well, your method has more disadvantages than advantages in my opinion. The biggest one is the "fur effect" in rich detail areas and bright disturbing pixels. It's very eye catching.
That's only in the sharpened version. Try comparing with my initial image, not the one I posted later.
It compiles, let's ship it!

forart
Posts: 1050
Joined: Mon Nov 29, 2004 1:36 pm
Location: Italy
Contact:

Post by forart »

Hey guyz, this 3ad seems "a bit" offtopic, dont'you ?
»Forward Agency NPO
In progress we (always) trust.

h-a-l-9000
Posts: 9
Joined: Mon Dec 26, 2005 3:44 pm

Post by h-a-l-9000 »

IMHO the neuronic interpolation looks sharper (better) than both mf's versions.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], dark, Semrush [Bot], Yandex [Bot] and 5 guests